diff options
Diffstat (limited to 'src/components/ui/toggle/index.tsx')
-rw-r--r-- | src/components/ui/toggle/index.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/ui/toggle/index.tsx b/src/components/ui/toggle/index.tsx index 7b6ba147f..856581a21 100644 --- a/src/components/ui/toggle/index.tsx +++ b/src/components/ui/toggle/index.tsx | |||
@@ -1,10 +1,10 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Property } from 'csstype'; | 2 | import { Property } from 'csstype'; |
3 | import { Component, InputHTMLAttributes } from 'react'; | 3 | import { Component, InputHTMLAttributes } from 'react'; |
4 | import injectStyle from 'react-jss'; | 4 | import injectStyle, { WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import { Theme } from '../../../themes'; |
7 | import { IFormField, IWithStyle } from '../typings/generic'; | 7 | import { IFormField } from '../typings/generic'; |
8 | 8 | ||
9 | import { Error } from '../error'; | 9 | import { Error } from '../error'; |
10 | import { Label } from '../label'; | 10 | import { Label } from '../label'; |
@@ -13,7 +13,7 @@ import { Wrapper } from '../wrapper'; | |||
13 | interface IProps | 13 | interface IProps |
14 | extends InputHTMLAttributes<HTMLInputElement>, | 14 | extends InputHTMLAttributes<HTMLInputElement>, |
15 | IFormField, | 15 | IFormField, |
16 | IWithStyle { | 16 | WithStylesProps<typeof styles> { |
17 | className?: string; | 17 | className?: string; |
18 | } | 18 | } |
19 | 19 | ||
@@ -122,4 +122,6 @@ class ToggleComponent extends Component<IProps> { | |||
122 | } | 122 | } |
123 | } | 123 | } |
124 | 124 | ||
125 | export const Toggle = injectStyle(styles)(ToggleComponent); | 125 | export const Toggle = injectStyle(styles, { injectTheme: true })( |
126 | ToggleComponent, | ||
127 | ); | ||