diff options
author | 2019-10-17 16:22:11 +0200 | |
---|---|---|
committer | 2019-10-17 16:22:11 +0200 | |
commit | 942466eb686c480133e1b0b8b9a2b975098b5bc4 (patch) | |
tree | 297a71efa4051949a4f2c411262558954c8c7d3a /src/components/ui/Button.js | |
parent | Merge pull request #121 from getferdi/l10n_develop (diff) | |
download | ferdium-app-942466eb686c480133e1b0b8b9a2b975098b5bc4.tar.gz ferdium-app-942466eb686c480133e1b0b8b9a2b975098b5bc4.tar.zst ferdium-app-942466eb686c480133e1b0b8b9a2b975098b5bc4.zip |
Implement #120v5.4.0-beta.1
Diffstat (limited to 'src/components/ui/Button.js')
-rw-r--r-- | src/components/ui/Button.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/components/ui/Button.js b/src/components/ui/Button.js index e2d7cea83..f46fd34ea 100644 --- a/src/components/ui/Button.js +++ b/src/components/ui/Button.js | |||
@@ -1,10 +1,10 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer, inject } from 'mobx-react'; |
4 | import Loader from 'react-loader'; | 4 | import Loader from 'react-loader'; |
5 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | 6 | ||
7 | export default @observer class Button extends Component { | 7 | export default @observer @inject('stores') class Button extends Component { |
8 | static propTypes = { | 8 | static propTypes = { |
9 | className: PropTypes.string, | 9 | className: PropTypes.string, |
10 | label: PropTypes.string.isRequired, | 10 | label: PropTypes.string.isRequired, |
@@ -14,6 +14,13 @@ export default @observer class Button extends Component { | |||
14 | buttonType: PropTypes.string, | 14 | buttonType: PropTypes.string, |
15 | loaded: PropTypes.bool, | 15 | loaded: PropTypes.bool, |
16 | htmlForm: PropTypes.string, | 16 | htmlForm: PropTypes.string, |
17 | stores: PropTypes.shape({ | ||
18 | settings: PropTypes.shape({ | ||
19 | app: PropTypes.shape({ | ||
20 | accentColor: PropTypes.string.isRequired, | ||
21 | }).isRequired, | ||
22 | }).isRequired, | ||
23 | }).isRequired, | ||
17 | }; | 24 | }; |
18 | 25 | ||
19 | static defaultProps = { | 26 | static defaultProps = { |
@@ -69,7 +76,7 @@ export default @observer class Button extends Component { | |||
69 | loaded={loaded} | 76 | loaded={loaded} |
70 | lines={10} | 77 | lines={10} |
71 | scale={0.4} | 78 | scale={0.4} |
72 | color={buttonType !== 'secondary' ? '#FFF' : '#7367F0'} | 79 | color={buttonType !== 'secondary' ? '#FFF' : this.props.stores.settings.app.accentColor} |
73 | component="span" | 80 | component="span" |
74 | /> | 81 | /> |
75 | {label} | 82 | {label} |