(
styles: S
)
| 1 | import { css, CSSAttribute } from 'goober'; |
| 2 | |
| 3 | export function makeStyles<S extends { [key: string]: CSSAttribute }, K extends keyof S>( |
| 4 | styles: S |
| 5 | ): { [key in K]: string } { |
| 6 | return Object.entries(styles).reduce( |
| 7 | (acc, [key, value]) => ({ |
| 8 | ...acc, |
| 9 | [key]: css(value), |
| 10 | }), |
| 11 | {} as { [key in K]: string } |
| 12 | ); |
| 13 | } |
| 14 | |
| 15 | export const ComponentClasses = { |
| 16 | SnackbarContainer: 'notistack-SnackbarContainer', |
no outgoing calls
no test coverage detected
searching dependent graphs…