react-toolbox/components/navigation
Javi Velasco 9d6ec1eedd Update dependencies and linter (#1180) 2017-01-26 18:05:32 +01:00
..
Navigation.d.ts Restructure typescript definitions (#1114) 2017-01-18 08:37:37 +01:00
Navigation.js Update dependencies and linter (#1180) 2017-01-26 18:05:32 +01:00
config.css Migrate styles to PostCSS (#666) 2017-01-05 02:42:18 +01:00
index.d.ts Restructure typescript definitions (#1114) 2017-01-18 08:37:37 +01:00
index.js Update dependencies and linter (#1180) 2017-01-26 18:05:32 +01:00
readme.md Autoinject Navigation theme 2016-05-29 21:56:10 +02:00
theme.css Fixes #1127 2017-01-18 10:56:03 +01:00

readme.md

Navigation

This component is intended to be a common wrapper for a group of links or buttons. It sets a minimal layout, semantic markup and spacing for each of those elements.

import Navigation from 'react-toolbox/lib/navigation';
import Link from 'react-toolbox/lib/link';

const actions = [
  { label: 'Alarm', raised: true, icon: 'access_alarm'},
  { label: 'Location', raised: true, accent: true, icon: 'room'}
];

const NavigationTest = () => (
  <div>
    <Navigation type='horizontal' actions={actions} />
    <Navigation type='vertical'>
      <Link href='http://' label='Inbox' icon='inbox' />
      <Link href='http://' active label='Profile' icon='person' />
    </Navigation>
  </div>
);

The theming for this component can be provided using the key RTNavigation.

Properties

Name Type Default Description
actions Array Array of objects that will be represented as <Button/> so the keys will be transferred as properties the Button Component.
className String Set a custom class styles to style the navigation.
routes Array Array of objects similar to actions but that will be rendered as <Link/> component definition.
type String horizontal Type of the navigation, it can be vertical or horizontal.

Theming

Name Description
button Used for buttons provided in the component.
horizontal Used for the root element if the layout is horizontal.
link Used for links provided in the component.
vertical Used for the root element if the layout is vertical.