diff options
Diffstat (limited to 'src/features/workspaces/components')
-rw-r--r-- | src/features/workspaces/components/EditWorkspaceForm.js | 2 | ||||
-rw-r--r-- | src/features/workspaces/components/WorkspaceServiceListItem.tsx | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/features/workspaces/components/EditWorkspaceForm.js b/src/features/workspaces/components/EditWorkspaceForm.js index 6bc9ae6f0..509df97e6 100644 --- a/src/features/workspaces/components/EditWorkspaceForm.js +++ b/src/features/workspaces/components/EditWorkspaceForm.js | |||
@@ -176,7 +176,7 @@ class EditWorkspaceForm extends Component { | |||
176 | )} | 176 | )} |
177 | <div className={classes.nameInput}> | 177 | <div className={classes.nameInput}> |
178 | <Input {...form.$('name').bind()} /> | 178 | <Input {...form.$('name').bind()} /> |
179 | <Toggle field={form.$('keepLoaded')} /> | 179 | <Toggle {...form.$('keepLoaded').bind()} /> |
180 | <p className={`${classes.keepLoadedInfo} franz-form__label`}> | 180 | <p className={`${classes.keepLoadedInfo} franz-form__label`}> |
181 | {intl.formatMessage(messages.keepLoadedInfo)} | 181 | {intl.formatMessage(messages.keepLoadedInfo)} |
182 | </p> | 182 | </p> |
diff --git a/src/features/workspaces/components/WorkspaceServiceListItem.tsx b/src/features/workspaces/components/WorkspaceServiceListItem.tsx index 0233d5749..420aed595 100644 --- a/src/features/workspaces/components/WorkspaceServiceListItem.tsx +++ b/src/features/workspaces/components/WorkspaceServiceListItem.tsx | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Component } from 'react'; | 1 | import { Component, ReactElement } from 'react'; |
2 | import { observer } from 'mobx-react'; | 2 | import { observer } from 'mobx-react'; |
3 | import injectSheet from 'react-jss'; | 3 | import withStyles, { WithStylesProps } from 'react-jss'; |
4 | import classnames from 'classnames'; | 4 | import classnames from 'classnames'; |
5 | 5 | import Toggle from '../../../components/ui/toggle'; | |
6 | import Toggle from '../../../components/ui/toggle/index'; | ||
7 | import ServiceIcon from '../../../components/ui/ServiceIcon'; | 6 | import ServiceIcon from '../../../components/ui/ServiceIcon'; |
7 | import Service from '../../../models/Service'; | ||
8 | 8 | ||
9 | const styles = theme => ({ | 9 | const styles = theme => ({ |
10 | listItem: { | 10 | listItem: { |
@@ -29,15 +29,15 @@ const styles = theme => ({ | |||
29 | }, | 29 | }, |
30 | }); | 30 | }); |
31 | 31 | ||
32 | type Props = { | 32 | interface IProps extends WithStylesProps<typeof styles> { |
33 | classes: any; | ||
34 | isInWorkspace: boolean; | 33 | isInWorkspace: boolean; |
35 | onToggle: () => void; | 34 | onToggle: () => void; |
36 | service: any; | 35 | service: Service; |
37 | }; | 36 | } |
38 | 37 | ||
39 | class WorkspaceServiceListItem extends Component<Props> { | 38 | @observer |
40 | render() { | 39 | class WorkspaceServiceListItem extends Component<IProps> { |
40 | render(): ReactElement { | ||
41 | const { classes, isInWorkspace, onToggle, service } = this.props; | 41 | const { classes, isInWorkspace, onToggle, service } = this.props; |
42 | 42 | ||
43 | return ( | 43 | return ( |
@@ -53,7 +53,7 @@ class WorkspaceServiceListItem extends Component<Props> { | |||
53 | </span> | 53 | </span> |
54 | <Toggle | 54 | <Toggle |
55 | className={classes.toggle} | 55 | className={classes.toggle} |
56 | checked={isInWorkspace} | 56 | value={isInWorkspace} |
57 | onChange={onToggle} | 57 | onChange={onToggle} |
58 | /> | 58 | /> |
59 | </div> | 59 | </div> |
@@ -61,6 +61,6 @@ class WorkspaceServiceListItem extends Component<Props> { | |||
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||
64 | export default injectSheet(styles, { injectTheme: true })( | 64 | export default withStyles(styles, { injectTheme: true })( |
65 | observer(WorkspaceServiceListItem), | 65 | WorkspaceServiceListItem, |
66 | ); | 66 | ); |