From a0cd2114a237ca40c28851669780c2ac71f80272 Mon Sep 17 00:00:00 2001 From: lukeschunk Date: Tue, 13 Mar 2018 14:14:36 -0600 Subject: [PATCH 1/5] added glamor dep --- package.json | 1 + src/components/Button.js | 100 ++++++++++------ yarn.lock | 238 +++++++-------------------------------- 3 files changed, 109 insertions(+), 230 deletions(-) diff --git a/package.json b/package.json index 5148e51b4..2bcbb091b 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "bowser": "^1.5.0", "d3": "^3.5.6", "focus-trap-react": "^3.0.5", + "glamor": "^2.20.40", "keycode": "^2.1.8", "lodash": "^4.6.1", "moment": "2.18.1", diff --git a/src/components/Button.js b/src/components/Button.js index 4b86ca7d5..41ddbadd3 100644 --- a/src/components/Button.js +++ b/src/components/Button.js @@ -1,6 +1,7 @@ const React = require('react'); const PropTypes = require('prop-types'); -const Radium = require('radium'); + +import { css } from 'glamor'; const Icon = require('./Icon'); const Spin = require('./Spin'); @@ -36,7 +37,7 @@ class Button extends React.Component { deprecatePrimaryColor(this.props); } - _windowSizeIsSmall = (theme) => { + _windowSizeIsSmall = theme => { const windowSize = StyleUtils.getWindowSize(theme.BreakPoints); return windowSize === 'medium' || windowSize === 'large'; @@ -60,7 +61,18 @@ class Button extends React.Component { render () { // Manually consume everything that isn't going to be passed down to the button so we don't have to keep adding props one at a time. // Keep elementProps for backwards compatibility. - const { actionText, buttonRef, children, elementProps, icon, isActive, primaryColor, style, theme, ...rest } = this.props; + const { + actionText, + buttonRef, + children, + elementProps, + icon, + isActive, + primaryColor, + style, + theme, + ...rest + } = this.props; const mergedTheme = StyleUtils.mergeTheme(theme, primaryColor); const styles = this.styles(mergedTheme); @@ -68,18 +80,18 @@ class Button extends React.Component {