Created
August 11, 2015 03:01
-
-
Save hedgerworkco/b57cec0ccc64106ade77 to your computer and use it in GitHub Desktop.
This file contains 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
.menu { | |
opacity: 0.0; | |
transform: translate3d(-100%, 0, 0); | |
transition: opacity 2s ease transform 2s ease; | |
} | |
.menu.is-open { | |
opacity: 1.0; | |
transform: translate3d(0, 0, 0); | |
transition: opacity 2s ease transform 2s ease; | |
} |
This file contains 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 React, { Component, PropTypes } from 'react'; | |
import cx from 'classnames'; | |
export default class MyComponent extends Component { | |
render() { | |
// any classes that should always be on just use true as value | |
const menuClasses = cx({ | |
'menu': true, | |
'is-open': this.state.isOpen | |
}); | |
return ( | |
<div className={ menuClasses }> | |
Foo | |
</div> | |
); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment