Skip to content

Instantly share code, notes, and snippets.

@hedgerworkco
Created August 11, 2015 03:01
Show Gist options
  • Save hedgerworkco/b57cec0ccc64106ade77 to your computer and use it in GitHub Desktop.
Save hedgerworkco/b57cec0ccc64106ade77 to your computer and use it in GitHub Desktop.
.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;
}
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