@dabapps/roe
Version:
A collection of React components, styles, mixins, and atomic CSS classes to aid with the development of web applications.
78 lines (65 loc) • 1.92 kB
Markdown
#### Example
```js
import { NavBar, Nav, NavItem, Column, FormGroup } from '@dabapps/roe';
class NavBarExample extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.onChange = this.onChange.bind(this);
}
render() {
const { type } = this.state;
return (
<div>
<NavBar fixed={type === 'fixed'} shy={type === 'shy'}>
<Column>
<h1 className="font-size-large display-inline-block margin-bottom-none margin-top-small">
Title
</h1>
<Nav className="float-right">
<NavItem active>
<a>One</a>
</NavItem>
<NavItem>
<a>Two</a>
</NavItem>
<NavItem>
<a>Three</a>
</NavItem>
<NavItem className="button hollow primary">
<a>Logout</a>
</NavItem>
</Nav>
</Column>
</NavBar>
<FormGroup block>
<label>NavBar type</label>
<select onChange={this.onChange}>
<option value="static">Static</option>
<option value="fixed">Fixed</option>
<option value="shy">Shy</option>
</select>
</FormGroup>
</div>
);
}
onChange(event) {
this.setState({
type: event.target.value,
});
}
}
<NavBarExample />;
```
#### Less variables
```css
-bar-text-color: -color-base; // @grey-dark
-bar-link-color: -color; // @primary
-bar-link-color-hover: -color-hover; // darken(@primary, 15%)
-bar-link-text-decoration: -text-decoration; // none
-bar-link-text-decoration-hover: -text-decoration-hover; // none
-bar-background: -background; // @white;
-bar-border: -base;
-bar-height: -height + -base * 2;
-bar-z-index: 500;
```