@dabapps/roe
Version:
A Collection of React Components for Project Development
83 lines (73 loc) • 1.82 kB
Markdown
#### Example
```js
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>
<SpacedGroup>
<h1 className="font-size-large display-inline">
Title
</h1>
<a>
Link
</a>
<Button>
Home
</Button>
<Button>
About
</Button>
<Button>
Contact
</Button>
</SpacedGroup>
</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
```less
-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;
```