Skip to content

Commit

Permalink
[styles] Add options definitions for makeStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Nov 28, 2018
1 parent 1c8c887 commit fe68a9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/material-ui-styles/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ declare module '@material-ui/styles/makeStyles' {
ClassNameMap,
PropsOfStyles,
Styles,
WithStylesOptions
} from '@material-ui/styles/withStyles';

export default function makeStyles<S extends Styles<any, any>>(
styles: S,
options?: WithStylesOptions<ClassKeyOfStyles<S>>
): (props: PropsOfStyles<S>) => ClassNameMap<ClassKeyOfStyles<S>>;
}

Expand Down
3 changes: 3 additions & 0 deletions packages/material-ui-styles/test/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ function testGetThemeProps(theme: Theme, props: AppBarProps): void {
</div>
);
};

// testing options
const useConfiguredStyles = makeStyles(styles, { flip: true, name: 'some-sheet' });
}

// styled
Expand Down

0 comments on commit fe68a9e

Please sign in to comment.