Closed SukkaW closed 2 years ago
I am using in React component level based style composition:
import style9 from 'style9'; const styles = style9.create({ base: { /* */ } }); export const SomeComponent = (props: { $style?: // How to type this? }) => ( <div classNames={style9(styles.base, props.$style)} /> );
const styles = style9.create({ extend: { /* */ } }); <SomeComponent $style={styles.extend} />
With StyleWithAtRules being exported, I can type SomeComponent like this:
StyleWithAtRules
SomeComponent
import style9, { type StyleWithAtRules } from 'style9'; export const SomeComponent = (props: { $style?: StyleWithAtRules }) => ( <div classNames={style9(styles.base, props.$style)} /> );
Released in 0.11.0
I am using in React component level based style composition:
With
StyleWithAtRules
being exported, I can typeSomeComponent
like this: