@kano/kbc-navbar
Injectable dialog into mini apps
Last updated 6 days ago by onishiweb .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kano/kbc-navbar 
SYNC missed versions from official npm registry.

kbc-navbar

A basic navbar with dropdown option plus action and link components, injectable into Kano boilerplate apps.

Exported Components

  • KbcNavbar: wrapper component for navbar, with dropdown menu
  • NavLink: generic menu link button
  • NavAction: generic menu action (non-routing) button
  • ExportAction: menu action button for exporting current etc.
  • ImportAction: menu action button for importing current etc.
  • Logo: image and text to show the branding of a particular app

KbcNavbar

Props

  • user?: current user
  • modifier?: string with app name for CSS class names
  • menuText?: string with translation of title for dropdown toggle
  • logo: app logo, as a React component
  • logoText?: visible app name
  • logoLink?: link for when user clicks on the app name/logo
  • children?: NavLinks and NavActions to include in menu bar
  • dropdownChildren?: NavLinks and NavActions to include in dropdown menu

Usage

import React, { Component } from 'react';
import { NavLink, NavAction, ExportAction, KbcNavbar } from '@kano/kbc-navbar'

render() {
       <KbcNavbar
              user={user}
              modifier={modifier}
              brand={
                     [[React component with logo and title]]
              }
              menuText={intl.formatMessage({...messages.menu})}
              children={
                     <>
                            [[ child components, eg:
                                   <NavAction text={intl.formatMessage({...messages.clearEditor})} action={() => editor.reset()} icon="delete22" />
                            ...
                            ]]
                     </>
              }
              dropdownChildren={
                     <>
                            [[ child components, eg:
                                   <ExportAction
                                   action={() => editor.workspaceToolbar.export()}
                                   text={intl.formatMessage({...messages.export})}
                                   />
                                   ...
                            ]]
                     </>

              }
              />
}

NavLink

Props

  • text: visible string
  • link
  • icon?: kbc-icon icon key
  • dropdown?: boolean, toggles different size icon for menus

Usage

       <KbcNavbar
       ...
       children= {
              <>
                     <NavLink text={text} link="/wherever" icon="bolt22" />
              </>
       }
       />

NavAction

Props

  • text: visible string
  • action
  • icon?: kbc-icons key
  • dropdown?: boolean, toggles different size icon for menus
  • active?: boolean, toggles different style for button 'in use'

Usage

       <KbcNavbar
       ...
       children= {
              <>
                     <NavAction text={intl.formatMessage({...messages.clearEditor})} action={() => editor.reset()} icon="delete22" />
              </>
       }
       />

ExportAction / ImportAction

Props

  • text: string;
  • action: () => void;

Usage

       <KbcNavbar
       ...
       dropdownChildren= {
              <>
                     <ExportAction
                            action={() => editor.workspaceToolbar.export()}
                            text={intl.formatMessage({...messages.export})}
                        />
              </>
       }
       />

Logo

Props

  • img: a React component containing the app logo
  • modifier?: string for updated CSS classes
  • text?: the text for the visible app name

Current Tags

  • 1.8.5                                ...           latest (6 days ago)

136 Versions

  • 1.8.5                                ...           6 days ago
  • 1.8.4-alpha.0                                ...           7 days ago
  • 1.8.3                                ...           12 days ago
  • 1.8.2                                ...           12 days ago
  • 1.8.1                                ...           13 days ago
  • 1.8.0                                ...           14 days ago
  • 1.7.2                                ...           15 days ago
  • 1.7.1                                ...           15 days ago
  • 1.7.0                                ...           15 days ago
  • 1.6.3                                ...           18 days ago
  • 1.6.2                                ...           19 days ago
  • 1.6.0                                ...           19 days ago
  • 1.5.6                                ...           a month ago
  • 1.5.5                                ...           a month ago
  • 1.5.4                                ...           a month ago
  • 1.5.3                                ...           a month ago
  • 1.5.2                                ...           a month ago
  • 1.5.1                                ...           a month ago
  • 1.5.0                                ...           a month ago
  • 1.4.6                                ...           a month ago
  • 1.4.5                                ...           a month ago
  • 1.4.4                                ...           2 months ago
  • 1.4.3                                ...           2 months ago
  • 1.4.2                                ...           2 months ago
  • 1.4.1                                ...           2 months ago
  • 1.4.0                                ...           2 months ago
  • 1.3.4                                ...           2 months ago
  • 1.3.3                                ...           2 months ago
  • 1.3.2                                ...           2 months ago
  • 1.3.1                                ...           2 months ago
  • 1.3.0                                ...           2 months ago
  • 1.2.2                                ...           2 months ago
  • 1.2.1                                ...           2 months ago
  • 1.2.0                                ...           2 months ago
  • 1.1.13                                ...           2 months ago
  • 1.1.12                                ...           2 months ago
  • 1.1.11                                ...           2 months ago
  • 1.1.10                                ...           2 months ago
  • 1.1.9                                ...           2 months ago
  • 1.1.8                                ...           2 months ago
  • 1.1.7                                ...           3 months ago
  • 1.1.6                                ...           3 months ago
  • 1.1.5                                ...           3 months ago
  • 1.1.4                                ...           3 months ago
  • 1.1.3                                ...           3 months ago
  • 1.1.2                                ...           3 months ago
  • 1.1.1                                ...           3 months ago
  • 1.1.0                                ...           3 months ago
  • 1.0.4                                ...           3 months ago
  • 1.0.3                                ...           3 months ago
  • 1.0.2                                ...           3 months ago
  • 1.0.1                                ...           3 months ago
  • 1.0.0                                ...           3 months ago
  • 4.26.12-alpha.0                                ...           3 months ago
  • 4.26.11-alpha.0                                ...           3 months ago
  • 4.26.10-alpha.0                                ...           3 months ago
  • 4.26.9-alpha.0                                ...           3 months ago
  • 4.26.8-alpha.0                                ...           3 months ago
  • 4.26.4-alpha.0                                ...           4 months ago
  • 4.26.3-alpha.0                                ...           4 months ago
  • 4.26.2-alpha.0                                ...           4 months ago
  • 4.26.1-alpha.0                                ...           4 months ago
  • 4.26.0-alpha.0                                ...           4 months ago
  • 4.25.4-alpha.0                                ...           4 months ago
  • 4.25.2-alpha.0                                ...           4 months ago
  • 4.25.0-alpha.1                                ...           4 months ago
  • 4.25.0-alpha.0                                ...           4 months ago
  • 4.24.2-alpha.0                                ...           4 months ago
  • 4.24.0-alpha.0                                ...           4 months ago
  • 4.23.1-alpha.0                                ...           4 months ago
  • 4.23.0-alpha.0                                ...           4 months ago
  • 4.22.25-alpha.0                                ...           4 months ago
  • 4.22.24-alpha.0                                ...           4 months ago
  • 4.22.23-alpha.0                                ...           4 months ago
  • 4.22.22-alpha.0                                ...           4 months ago
  • 4.22.21-alpha.0                                ...           4 months ago
  • 4.22.20-alpha.0                                ...           4 months ago
  • 4.22.19-alpha.0                                ...           4 months ago
  • 4.22.18-alpha.0                                ...           4 months ago
  • 4.22.17-alpha.0                                ...           4 months ago
  • 4.22.14-alpha.0                                ...           4 months ago
  • 4.22.13-alpha.0                                ...           4 months ago
  • 4.22.12-alpha.0                                ...           4 months ago
  • 4.22.11-alpha.0                                ...           4 months ago
  • 4.22.10-alpha.0                                ...           4 months ago
  • 4.22.9-alpha.0                                ...           4 months ago
  • 4.22.7-alpha.0                                ...           4 months ago
  • 4.22.6-alpha.0                                ...           5 months ago
  • 4.22.5-alpha.0                                ...           5 months ago
  • 4.22.4-alpha.0                                ...           5 months ago
  • 4.22.1-alpha.0                                ...           5 months ago
  • 4.21.6-alpha.0                                ...           5 months ago
  • 4.22.0-alpha.0                                ...           5 months ago
  • 4.21.4-alpha.0                                ...           5 months ago
  • 4.21.3-alpha.0                                ...           5 months ago
  • 4.21.1-alpha.0                                ...           5 months ago
  • 4.21.0-alpha.0                                ...           5 months ago
  • 4.20.4-alpha.0                                ...           5 months ago
  • 4.20.1-alpha.0                                ...           5 months ago
  • 4.20.0-alpha.0                                ...           5 months ago
  • 4.19.3-alpha.0                                ...           5 months ago
  • 4.19.2-alpha.0                                ...           5 months ago
  • 4.19.1-alpha.0                                ...           5 months ago
  • 4.19.0-alpha.0                                ...           5 months ago
  • 4.18.0-alpha.0                                ...           5 months ago
  • 4.17.1-alpha.0                                ...           5 months ago
  • 4.16.4-alpha.0                                ...           5 months ago
  • 4.16.3-alpha.0                                ...           6 months ago
  • 4.15.0                                ...           6 months ago
  • 4.14.13-alpha.0                                ...           6 months ago
  • 4.14.12-alpha.0                                ...           6 months ago
  • 4.14.10-alpha.0                                ...           6 months ago
  • 4.14.9-alpha.0                                ...           6 months ago
  • 4.14.8-alpha.0                                ...           6 months ago
  • 4.14.5-alpha.0                                ...           6 months ago
  • 4.14.3-alpha.0                                ...           6 months ago
  • 4.14.2-alpha.0                                ...           7 months ago
  • 4.14.1-alpha.0                                ...           7 months ago
  • 4.13.6-alpha.0                                ...           7 months ago
  • 4.13.5-alpha.0                                ...           7 months ago
  • 4.13.2-alpha.0                                ...           7 months ago
  • 4.13.1-alpha.0                                ...           7 months ago
  • 4.13.0-alpha.0                                ...           7 months ago
  • 4.12.0-alpha.0                                ...           7 months ago
  • 4.11.5-alpha.0                                ...           7 months ago
  • 4.11.4-alpha.0                                ...           7 months ago
  • 4.11.3-alpha.0                                ...           7 months ago
  • 4.11.2-alpha.0                                ...           7 months ago
  • 4.11.1-alpha.0                                ...           7 months ago
  • 4.10.5-alpha.0                                ...           7 months ago
  • 4.10.4-alpha.0                                ...           7 months ago
  • 4.10.3-alpha.0                                ...           7 months ago
  • 4.10.2-alpha.0                                ...           7 months ago
  • 4.10.1-alpha.0                                ...           7 months ago
  • 4.0.0-alpha.1                                ...           7 months ago
  • 4.0.0-alpha.0                                ...           7 months ago
Downloads
Today 0
This Week 0
This Month 161
Last Day 0
Last Week 19
Last Month 406
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |