@storybynumbers/jck-navigation

2.0.8 • Public • Published

JCK Navigation

Usage

const languageLinks = {
    en: '/en',
    nl: '/'
};
<Navigation absoluteDomain="//jck.nl"
            langLinks={languageLinks}
            language={this.state.language}
            pages={p.pages}
            menuShown={this.state.menuShown}
            toggle={this._toggleMenu}
            hide={this._hideMenu} />

Options

Property Type Description
absoluteDomain String Websites other than jck.nl should set this to "//jck.nl"
hide Function Callback function to set the menuShown property to false
language String Language (eg: 'en')
languageSelectorOptions Object Options to pass to LanguageSelector
menuShown Boolean If true, the menu will expand outwards.
pages Array Menu structure. Should be result from menu API endpoint. DEPRECIATED.
toggle Function Callback function to toggle the menuShown property

Building the library

This library component is based off the create-react-library starter kit. The build asset is an exportable module:

npm run build or yarn run build

This can be published to npm by bumping up the version number in package.json and running:

npm publish

Developing the library

Fire up a development environment based off src/demo/index.js:

HTTPS=true yarn start

Readme

Keywords

none

Package Sidebar

Install

npm i @storybynumbers/jck-navigation

Weekly Downloads

1

Version

2.0.8

License

MIT

Unpacked Size

444 kB

Total Files

12

Last publish

Collaborators

  • storybynumbers
  • zemyatin