diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-14 08:50:46 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-16 18:02:55 -0400 |
commit | 12896bd23eeba79884245c1c29fdc568cf21a7fa (patch) | |
tree | 4e7f83d3e2564b9b89d669e9f7905ff11768b11a /web/react/components/user_settings/premade_theme_chooser.jsx | |
parent | 29fe6a3d13c9c7aa490fffebbe5d1b5fdf1e3090 (diff) | |
download | chat-12896bd23eeba79884245c1c29fdc568cf21a7fa.tar.gz chat-12896bd23eeba79884245c1c29fdc568cf21a7fa.tar.bz2 chat-12896bd23eeba79884245c1c29fdc568cf21a7fa.zip |
Converting to Webpack. Stage 1.
Diffstat (limited to 'web/react/components/user_settings/premade_theme_chooser.jsx')
-rw-r--r-- | web/react/components/user_settings/premade_theme_chooser.jsx | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/web/react/components/user_settings/premade_theme_chooser.jsx b/web/react/components/user_settings/premade_theme_chooser.jsx deleted file mode 100644 index 80ff8c4de..000000000 --- a/web/react/components/user_settings/premade_theme_chooser.jsx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import * as Utils from '../../utils/utils.jsx'; -import Constants from '../../utils/constants.jsx'; - -export default class PremadeThemeChooser extends React.Component { - constructor(props) { - super(props); - this.state = {}; - } - render() { - const theme = this.props.theme; - - const premadeThemes = []; - for (const k in Constants.THEMES) { - if (Constants.THEMES.hasOwnProperty(k)) { - const premadeTheme = $.extend(true, {}, Constants.THEMES[k]); - - let activeClass = ''; - if (premadeTheme.type === theme.type) { - activeClass = 'active'; - } - - premadeThemes.push( - <div - className='col-xs-6 col-sm-3 premade-themes' - key={'premade-theme-key' + k} - > - <div - className={activeClass} - onClick={() => this.props.updateTheme(premadeTheme)} - > - <label> - <img - className='img-responsive' - src={'/static/images/themes/' + premadeTheme.type.toLowerCase() + '.png'} - /> - <div className='theme-label'>{Utils.toTitleCase(premadeTheme.type)}</div> - </label> - </div> - </div> - ); - } - } - - return ( - <div className='row appearance-section'> - {premadeThemes} - </div> - ); - } -} - -PremadeThemeChooser.propTypes = { - theme: React.PropTypes.object.isRequired, - updateTheme: React.PropTypes.func.isRequired -}; |