@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
1 lines • 2.06 kB
Source Map (JSON)
{"version":3,"file":"CheckIcon.cjs","names":["rem"],"sources":["../../../src/components/Checkbox/CheckIcon.tsx"],"sourcesContent":["import { rem } from '../../core';\n\nexport interface CheckboxIconProps extends React.ComponentProps<'svg'> {\n indeterminate: boolean | undefined;\n}\n\nexport interface CheckIconProps extends React.ComponentProps<'svg'> {\n size?: number | string;\n}\n\nexport function CheckIcon({ size, style, ...others }: CheckIconProps) {\n const _style = size !== undefined ? { width: rem(size), height: rem(size), ...style } : style;\n\n return (\n <svg\n viewBox=\"0 0 10 7\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={_style}\n aria-hidden\n {...others}\n >\n <path\n d=\"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\nexport function CheckboxIcon({ indeterminate, ...others }: CheckboxIconProps) {\n if (indeterminate) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 32 6\"\n aria-hidden\n {...others}\n >\n <rect width=\"32\" height=\"6\" fill=\"currentColor\" rx=\"3\" />\n </svg>\n );\n }\n\n return <CheckIcon {...others} />;\n}\n"],"mappings":";;;;;AAUA,SAAgB,UAAU,EAAE,MAAM,OAAO,GAAG,UAA0B;CAGpE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,SAAQ;EACR,MAAK;EACL,OAAM;EACN,OAPW,SAAS,KAAA,IAAY;GAAE,OAAOA,YAAAA,IAAI,IAAI;GAAG,QAAQA,YAAAA,IAAI,IAAI;GAAG,GAAG;EAAM,IAAI;EAQpF,eAAA;EACA,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,UAAS;GACT,UAAS;EACV,CAAA;CACE,CAAA;AAET;AAEA,SAAgB,aAAa,EAAE,eAAe,GAAG,UAA6B;CAC5E,IAAI,eACF,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,OAAM;EACN,MAAK;EACL,SAAQ;EACR,eAAA;EACA,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,OAAM;GAAK,QAAO;GAAI,MAAK;GAAe,IAAG;EAAK,CAAA;CACrD,CAAA;CAIT,OAAO,iBAAA,GAAA,kBAAA,KAAC,WAAD,EAAW,GAAI,OAAS,CAAA;AACjC"}