Skip to content

Commit

Permalink
Export useTheme in TypeScript declaration (#1124)
Browse files Browse the repository at this point in the history
* Export useTheme in TypeScript declaration

* Space TypeScript declarations
  • Loading branch information
nikuda authored and Henri committed Jun 12, 2019
1 parent 512c92e commit 95f1681
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions packages/react-jss/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ import {
SheetsRegistry,
Styles,
StyleSheetFactoryOptions,
CreateGenerateIdOptions
CreateGenerateIdOptions,
} from 'jss'
import {ThemeProvider, withTheme, createTheming, Theming} from 'theming'
import {
createTheming,
useTheme,
withTheme,
ThemeProvider,
Theming,
} from 'theming'

declare const jss: Jss

declare const createGenerateId: CreateGenerateId

declare const JssProvider: ComponentType<{
jss?: Jss
registry?: SheetsRegistry
Expand All @@ -21,9 +29,11 @@ declare const JssProvider: ComponentType<{
children: ReactNode
id?: CreateGenerateIdOptions
}>

interface Managers {
[key: number]: StyleSheet
}

declare const JssContext: Context<{
jss?: Jss
registry?: SheetsRegistry
Expand Down Expand Up @@ -63,7 +73,8 @@ export {
ThemeProvider,
withTheme,
createTheming,
JssContext
useTheme,
JssContext,
}

export default withStyles

0 comments on commit 95f1681

Please sign in to comment.