@bnnvara/hub
v1.0.2
Published
A fixed toolbar on top of a page
Downloads
4
Readme
HUB
Implements a toolbar like component that can be placed on top of the page and can hold some navigation controls and buttons.
Examples
The component takes the following optional properties:
| name | type | description | |---|---|---| | children | React.Children | a collection of elements that will be placed on the left hand side of the component | | actions | [ React.Node ] | an array of elements that will be placed on the right hand side of the component |
###code
import React from 'react';
import Hub from '@bnnvara/hub';
import {
Close, Search, Logo, Settings
} from '@bnnvara/icons'
export default const () => (
<Hub
actions={[
<Settings key="settings" />,
<Search key="search" />,
<Close key="close" />,
]}
>
<Logo/>
</Hub>
)