the-header
Header of the-components
Installation
$ npm install the-header --save
Usage
'use strict' PureComponent { superprops thisstate = notice: true } { const MockPage = ExampleComponent const Logo Tab TabItem RightArea = TheHeader return <div> <TheRouterHash> <TheHeaderStyle/> <TheButtonStyle/> <TheHeader notices=thisstatenotice ? 'you needs to verify your email': this : {}> <Logo>Some app</Logo> <Tab> <TabItem to='/page-a'>PageA</TabItem> <TabItem to='/page-b'>PageB</TabItem> </Tab> <RightArea> <TheButton>Login</TheButton> <TheButton primary>Sign Up</TheButton> </RightArea> </TheHeader> <div> <MockPage path='/page-a' color='#83A' message='This is Page A' /> <MockPage path='/page-b' color='#38A' message='This is Page B' /> <hr/> <TheHeader asOverlay style=top: 190 > <Logo>Some app with overlay header</Logo> <Tab> <TabItem to='/page-a'>PageA</TabItem> <TabItem to='/page-b'>PageB</TabItem> <TabItem to='/page-b' icon='fa fa-search'/> </Tab> <RightArea> <TheButton>Login</TheButton> <TheButton primary>Sign Up</TheButton> </RightArea> </TheHeader> <hr/> <TheHeader asOverlay reversed ribbon='This is a ribbon' style=top: 400 > <Logo>Some app with overlay header</Logo> <Tab> <TabItem to='/page-a'>PageA</TabItem> <TabItem to='/page-b'>PageB</TabItem> <TabItem to='/page-b' icon='fa fa-search'/> </Tab> <RightArea> <TheButton>Login</TheButton> <TheButton primary>Sign Up</TheButton> </RightArea> </TheHeader> <br/> <TheHeader asStatic> <Logo>Some app with static header</Logo> </TheHeader> </div> </TheRouterHash> </div> } static { return <TheRoute path=path component= <div style=color> message </div> > </TheRoute> }
Components
TheHeader
Header of the-components
Props
Name | Type | Description | Default |
---|---|---|---|
asOverlay |
bool | Style as overlay | false |
asStatic |
bool | Render with static positioning | false |
notices |
object | Notices | {} |
reversed |
bool | Reversed theme | false |
ribbon |
node | Ribbon to show | null |
role |
'banner' |
TheHeaderStyle
Style for TheHeader
Props
Name | Type | Description | Default |
---|---|---|---|
options |
object | Style options | {} |
License
This software is released under the MIT License.