diff --git a/lib/components/common/StyledCard.tsx b/lib/components/common/StyledCard.tsx index a9bc14f..6244fdb 100644 --- a/lib/components/common/StyledCard.tsx +++ b/lib/components/common/StyledCard.tsx @@ -4,9 +4,9 @@ import Card from '@mui/material/Card'; import CardContent from '@mui/material/CardContent'; import CardActionArea from '@mui/material/CardActionArea'; import Typography from '@mui/material/Typography'; -import Radio from '@mui/material/Radio'; import {useRadioGroup} from '@mui/material/RadioGroup'; import FormControlLabel from '@mui/material/FormControlLabel'; +import StyledRadio from './StyledRadio'; import {vars} from '../../theme/variables'; const {baseWhite, primary50, primary600, primary800, gray100, gray300, gray500, gray700} = vars @@ -70,7 +70,7 @@ const StyledCard: React.FC = ({value, isSuggested, selectedValu } }} > - } label={value}/> {isSuggested && Suggested diff --git a/lib/components/common/StyledRadio.tsx b/lib/components/common/StyledRadio.tsx new file mode 100644 index 0000000..94c6697 --- /dev/null +++ b/lib/components/common/StyledRadio.tsx @@ -0,0 +1,35 @@ +import { styled } from '@mui/material/styles'; +import { Radio, RadioProps } from '@mui/material'; +import { RadioSelected } from '../../icons'; +import { vars } from '../../theme/variables'; + +const {baseWhite, primary100, primary600, gray100, gray300} = vars; + +const DefaultIcon = styled('span')(() => ({ + borderRadius: '50%', + width: 16, + height: 16, + backgroundColor: baseWhite, + border: `1px solid ${gray300}`, + 'input:hover ~ &': { + backgroundColor: primary100, + border: `1px solid ${primary600}` + }, + 'input:disabled ~ &': { + boxShadow: 'none', + border: `1px solid ${gray300}`, + background: gray100 + }, +})); + +export default function StyledRadio(props: RadioProps) { + return ( + } + icon={} + {...props} + /> + ); +} \ No newline at end of file diff --git a/lib/components/steps/Suggestions/SuggestionDetailUI.tsx b/lib/components/steps/Suggestions/SuggestionDetailUI.tsx index b2c2d8d..da08175 100644 --- a/lib/components/steps/Suggestions/SuggestionDetailUI.tsx +++ b/lib/components/steps/Suggestions/SuggestionDetailUI.tsx @@ -1,14 +1,16 @@ -import {Box, Checkbox, Typography} from '@mui/material'; -import {ArrowIcon, CheckboxDefault, CheckboxSelected, GlobeIcon} from '../../../icons'; +import {Box, Typography} from '@mui/material'; +import {ArrowIcon, GlobeIcon} from '../../../icons'; import CdeDetails from '../../common/CdeDetails.tsx'; import {vars} from '../../../theme/variables.ts'; import {Entity} from "../../../models.ts"; import {getCleanUrl} from "../../../helpers/functions.ts"; +import StyledRadio from '../../common/StyledRadio.tsx'; const { gray900, gray200, - gray500 + gray500, + gray300 } = vars; type SuggestionDetailUIProps = { @@ -42,8 +44,11 @@ function SuggestionDetailUI({entity}: SuggestionDetailUIProps) { return ( - - } checkedIcon={}/> + + diff --git a/lib/icons/index.tsx b/lib/icons/index.tsx index 2ed031f..a80f34e 100644 --- a/lib/icons/index.tsx +++ b/lib/icons/index.tsx @@ -213,4 +213,12 @@ export const PlusIcon = () => ( +) + +export const RadioSelected = () => ( + + + + + ) \ No newline at end of file