CHANGED: Some stuff changed in switch, Radio now is SVG
This commit is contained in:
@@ -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>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user