Commit 025958fc authored by Ray Schamp's avatar Ray Schamp

Add `align` prop to `SubNavigation` component

parent 00c7dc92
......@@ -9,10 +9,21 @@ require('./subnavigation.scss');
*/
var SubNavigation = React.createClass({
type: 'SubNavigation',
getDefaultProps: function () {
return {
align: 'middle'
};
},
render: function () {
var classes = classNames(
'sub-nav',
this.props.className
[
'sub-nav',
this.props.className
],
{
'sub-nav-align-left': this.props.align === 'left',
'sub-nav-align-right': this.props.align === 'right'
}
);
return (
<div className={classes}>
......
......@@ -53,4 +53,18 @@
}
}
}
&.sub-nav-align-left {
justify-content: flex-start;
li {
&:first-child {
margin-left: 0;
}
}
}
&.sub-nav-align-right {
justify-content: flex-end;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment