Skip to content

Instantly share code, notes, and snippets.

@mikeyamadeo
Last active September 8, 2015 23:01
Show Gist options
  • Save mikeyamadeo/f786a558d63d237bbbf3 to your computer and use it in GitHub Desktop.
Save mikeyamadeo/f786a558d63d237bbbf3 to your computer and use it in GitHub Desktop.
.Btn {
padding: .8em 1.5em;
color: white;
background-color: #EC87C0;
border: none;
}
.disabled {
background-color: #BBBBBB;
}
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