Last active
September 8, 2015 23:01
-
-
Save mikeyamadeo/f786a558d63d237bbbf3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.Btn { | |
padding: .8em 1.5em; | |
color: white; | |
background-color: #EC87C0; | |
border: none; | |
} | |
.disabled { | |
background-color: #BBBBBB; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import style from './style' | |
import React from 'react' | |
import cn from 'classnames' | |
import CSSModules from 'react-css-modules' | |
/** | |
* Notice use of `styleName` vs. `className` | |
*/ | |
const Btn = React.createClass({ | |
render () { | |
const { isDisabled } = this.props | |
return ( | |
<button styleName={cn('Btn', { | |
disabled: isDisabled | |
})}> | |
Submit | |
<button> | |
) | |
} | |
}) | |
export default CSSModules(Btn, style) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment