I am creating a custom radio component using a functional component. I get the props to work and the css is working but I cannot see the actual 'radio button'.
please have a look at my code - what am I missing here.
type Props = {
children: any,
color?: string,
size?: string,
}
const Radio = (props:Props) => {
let radioClass = ''
if(props.size === 'small') radioClass = 'radio-small';
if(props.size === 'large') radioClass = 'radio-large';
if(props.color === 'secondary') radioClass += ' radio-secondary';
if(props.color === 'warning') radioClass += ' radio-warning';
if(props.color === 'light') radioClass += ' radio-light';
if(props.color === 'dark') radioClass += ' radio-dark';
return (
<radio className={radioClass} > {props.children}</radio>
);
};
export default Radio
.radio-small {
font-size: 1.5em;
}
.radio-warning {
color: red;
}