@dabapps/roe
Version:
A collection of React components, styles, mixins, and atomic CSS classes to aid with the development of web applications.
67 lines (55 loc) • 1.32 kB
Markdown
#### Examples
```js
import { Button, SideBar, Nav, NavItem } from '@dabapps/roe';
class SideBarExample extends React.Component {
constructor() {
this.state = {
sideBarOpen: false,
};
this.openSideBar = () => {
this.setState({
sideBarOpen: true,
});
};
this.closeSideBar = () => {
this.setState({
sideBarOpen: false,
});
};
}
render() {
const { sideBarOpen } = this.state;
return (
<div>
<Button onClick={this.openSideBar}>Open SideBar</Button>
<SideBar onClickOutside={this.closeSideBar} open={sideBarOpen}>
<Nav>
<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>
<Button onClick={this.closeSideBar}>Close SideBar</Button>
</SideBar>
</div>
);
}
}
<SideBarExample />;
```
#### Less variables
```css
-bar-overlay-background: -background;
-bar-background: -background;
-bar-border: -base;
-bar-width: 250px;
-bar-z-index: 1200;
```