import { ComponentProps, SVGProps, useContext } from 'react'; import styled from 'styled-components'; import { Svg } from '../../components'; import { getVariantKey } from '../../variants'; import { CheckboxContext } from './checkbox.context'; import { checkboxVariants, ICheckboxVariants } from './checkbox.variants'; export type CheckboxIconProps = SVGProps & { variant?: keyof typeof checkboxVariants | (string & {}); variants?: ICheckboxVariants; }; const StyledChecked = styled(Svg) ` ${props => getVariantKey('checked', props.variant, props.variants)} `; const StyledUnchecked = styled(Svg) ` ${props => getVariantKey('unchecked', props.variant, props.variants)} `; function CheckboxChecked({ className, ...props }: ComponentProps) { return ( ); } function CheckboxUnchecked({ className, ...props }: ComponentProps) { return ( ); } export function CheckboxIcon({ variant = 'default', variants, ...props }: ComponentProps) { const context = useContext(CheckboxContext); return ( <> ); }