Toolbar React Component

    • / **F7Toolbar**
    <Toolbar> methods
    .hide(animate)Hide toolbar
    .show(animate)Show toolbar
    • **default** - element will be inserted as a child of <div class="toolbar-inner"> element
    • **before-inner** - element will be inserted right before <div class="toolbar-inner"> element
    • **after-inner** - element will be inserted right after <div class="toolbar-inner"> element
    1. export default class extends React.Component{
    2. constructor() {
    3. this.state = {
    4. isBottom: false,
    5. };
    6. }
    7. render() {
    8. return (
    9. <Page>
    10. <Navbar title="Toolbar" backLink="Back"></Navbar>
    11. <Toolbar bottomMd={this.state.isBottom}>
    12. <Link>Left Link</Link>
    13. <Link>Right Link</Link>
    14. </Toolbar>
    15. {this.$theme.md && (
    16. <BlockTitle>Toolbar Position</BlockTitle>
    17. )}
    18. {this.$theme.md && (
    19. <Block>
    20. <p>Material (MD) theme toolbar supports both top and bottom positions. Click the following button to change its position.</p>
    21. <p>
    22. </p>
    23. )}
    24. <Block>
    25. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam enim quia molestiae facilis laudantium voluptates obcaecati officia cum, sit libero commodi...</p>
    26. </Block>
    27. </Page>
    28. )
    29. }
    30. }
    1. export default class extends React.Component{
    2. constructor() {
    3. this.state = {
    4. isBottom: false,
    5. };
    6. }
    7. render() {
    8. return (
    9. <Page pageContent={false}>
    10. <Navbar title="Tabbar Labels" backLink="Back">
    11. {this.$theme.md && (
    12. <NavRight>
    13. <Link iconMaterial="compare_arrows" onClick={() => this.setState({isBottom: !this.state.isBottom})}></Link>
    14. </NavRight>
    15. )}
    16. </Navbar>
    17. <Toolbar tabbar labels bottomMd={this.state.isBottom}>
    18. <Link tabLink="#tab-1" tabLinkActive text="Tab 1" iconIos="f7:email_fill" iconMd="material:email"></Link>
    19. <Link tabLink="#tab-2" text="Tab 2" iconIos="f7:today_fill" iconMd="material:today"></Link>
    20. <Link tabLink="#tab-3" text="Tab 3" iconIos="f7:cloud_fill" iconMd="material:file_upload"></Link>
    21. </Toolbar>
    22. <Tabs>
    23. <Tab id="tab-1" className="page-content" tabActive>
    24. <Block>
    25. </Block>
    26. </Tab>
    27. <Tab id="tab-2" className="page-content">
    28. <Block>
    29. <p>Tab 2 content</p>
    30. ...
    31. </Block>
    32. </Tab>
    33. <Tab id="tab-3" className="page-content">
    34. <Block>
    35. <p>Tab 3 content</p>
    36. ...
    37. </Block>
    38. </Tab>
    39. </Tabs>
    40. </Page>
    41. )
    42. }
    43. }
    1. export default () => (
    2. <Page hideToolbarOnScroll>
    3. <Navbar title="Hide Toolbar On Scroll" backLink="Back"></Navbar>
    4. <Toolbar bottom-md>
    5. <Link>Left Link</Link>
    6. <Link>Right Link</Link>
    7. </Toolbar>
    8. <Block strong>
    9. <p>Toolbar will be hidden if you scroll bottom</p>
    10. </Block>
    11. <Block>
    12. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos maxime incidunt id ab culpa ipsa omnis eos, vel excepturi officiis neque illum perferendis dolorum magnam rerum natus dolore nulla ex.</p>
    13. ...
    14. </Block>
    15. </Page>