IconContext.tsx14 lines · main
| 1 | 'use client' |
| 2 | |
| 3 | import { createContext } from 'react' |
| 4 | |
| 5 | import { SizeVariantProps } from '../../lib/commonCva' |
| 6 | |
| 7 | type ContextValue = { contextSize?: SizeVariantProps; className?: string } |
| 8 | |
| 9 | // Make sure the shape of the default value passed to |
| 10 | // createContext matches the shape that the consumers expect! |
| 11 | export const IconContext = createContext<ContextValue>({ |
| 12 | contextSize: 'small', |
| 13 | className: '', |
| 14 | }) |