CHANGED: Some stuff changed in switch, Radio now is SVG

This commit is contained in:
2024-02-02 00:30:13 +04:00
parent df7901a779
commit f39f302555
8 changed files with 378 additions and 853 deletions

View File

@@ -18,12 +18,24 @@ export const Radio = forwardRef<HTMLInputElement, RadioProps>(
events = useRippleEffect(ripplesRef, setIsActive);
const classes =
`m3 m3-radio-label ${isActive === true ? 'visible' : ''}`.trimEnd();
`m3 m3-radio ${isActive === true ? 'visible' : ''}`.trimEnd();
return (
<label {...events} className={classes}>
<div {...events} className={classes}>
<CheckBoxLayout {...props} ref={ref} type={'radio'} />
<span className={'m3 m3-radio-state-layer'} />
<svg height={'20px'} viewBox={'0 0 20 20'} width={'20px'}>
<circle
className={'m3-radio-outline'}
cx={'50%'}
cy={'50%'}
/>
<circle
className={'m3-radio-state'}
cx={'50%'}
cy={'50%'}
/>
</svg>
<RippleArea
callback={setIsActive}
central={centralRipple}
@@ -31,7 +43,7 @@ export const Radio = forwardRef<HTMLInputElement, RadioProps>(
ref={ripplesRef}
/>
{props.children}
</label>
</div>
);
},
);