diff options
author | 2022-11-19 15:21:09 +0530 | |
---|---|---|
committer | 2022-11-19 09:51:09 +0000 | |
commit | a051331680b21f20201a47601d69505a4cfa9e40 (patch) | |
tree | f98dd4bc668c9814d58c0e49170aeeb19c2fe1de /src/components/services/content/ServiceDisabled.js | |
parent | 6.2.1-nightly.46 [skip ci] (diff) | |
download | ferdium-app-a051331680b21f20201a47601d69505a4cfa9e40.tar.gz ferdium-app-a051331680b21f20201a47601d69505a4cfa9e40.tar.zst ferdium-app-a051331680b21f20201a47601d69505a4cfa9e40.zip |
Transform service components to ts (#778)
Diffstat (limited to 'src/components/services/content/ServiceDisabled.js')
-rw-r--r-- | src/components/services/content/ServiceDisabled.js | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/components/services/content/ServiceDisabled.js b/src/components/services/content/ServiceDisabled.js deleted file mode 100644 index d874a354e..000000000 --- a/src/components/services/content/ServiceDisabled.js +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import { defineMessages, injectIntl } from 'react-intl'; | ||
5 | |||
6 | import Button from '../../ui/button'; | ||
7 | import { H1 } from '../../ui/headline'; | ||
8 | |||
9 | const messages = defineMessages({ | ||
10 | headline: { | ||
11 | id: 'service.disabledHandler.headline', | ||
12 | defaultMessage: '{name} is disabled', | ||
13 | }, | ||
14 | action: { | ||
15 | id: 'service.disabledHandler.action', | ||
16 | defaultMessage: 'Enable {name}', | ||
17 | }, | ||
18 | }); | ||
19 | |||
20 | class ServiceDisabled extends Component { | ||
21 | static propTypes = { | ||
22 | name: PropTypes.string.isRequired, | ||
23 | enable: PropTypes.func.isRequired, | ||
24 | }; | ||
25 | |||
26 | render() { | ||
27 | const { name, enable } = this.props; | ||
28 | const { intl } = this.props; | ||
29 | |||
30 | return ( | ||
31 | <div className="services__info-layer"> | ||
32 | <H1>{intl.formatMessage(messages.headline, { name })}</H1> | ||
33 | <Button | ||
34 | label={intl.formatMessage(messages.action, { name })} | ||
35 | buttonType="inverted" | ||
36 | onClick={() => enable()} | ||
37 | /> | ||
38 | </div> | ||
39 | ); | ||
40 | } | ||
41 | } | ||
42 | |||
43 | export default injectIntl(observer(ServiceDisabled)); | ||