fl-react-utils

11.3.1 • Public • Published

Boilerplate and helper functions for react/redux that can be shared amongst FounderLab apps

Sidebar

Wrapper for react-sidebar with some useful defaults.

...
import { Sidebar } from 'fl-react-utils'

class SomeComponent extends React.Component {
  render() {
    const { model } = this.props

    return (
      <Sidebar
        sidebar: <SidebarContent />,    // Required, component to be rendered inside the sidebar
        changeKey: model.id,           // Sidebar will close when this key changes (useful for closing on navigation)
        disableToggle: false,          // Hide the open/close toggle button when not in docket mode (< 768px)
      >
        <div>App content goes here</div>
      </Sidebar>
    )
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i fl-react-utils

Weekly Downloads

14

Version

11.3.1

License

MIT

Unpacked Size

160 kB

Total Files

74

Last publish

Collaborators

  • founderlab