| 3 | import { MediaQueryAllQueryable, MediaQueryMatchers } from './types' |
| 4 | |
| 5 | interface MediaQueryProps extends MediaQueryAllQueryable { |
| 6 | component?: ReactNode |
| 7 | children?: ReactNode | ((matches: boolean) => ReactNode) |
| 8 | query?: string |
| 9 | style?: CSSProperties |
| 10 | className?: string |
| 11 | device?: MediaQueryMatchers |
| 12 | values?: Partial<MediaQueryMatchers> |
| 13 | onBeforeChange?: (_matches: boolean) => void |
| 14 | onChange?: (_matches: boolean) => void |
| 15 | } |
| 16 | |
| 17 | // ReactNode and ReactElement typings are a little funky for functional components, so the ReactElement cast is needed on the return |
| 18 | const MediaQuery: FC<MediaQueryProps> = ({ |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…