Skip to content

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

License

Notifications You must be signed in to change notification settings

founderlab/fl-react-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package has moved to the Frameworkstein repository


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>
    )
  }
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published