react-toolbox/components/navigation
Javi Velasco 67ab8746a9 Proper import path for documentation files 2015-11-10 11:07:43 +01:00
..
_config.scss Setup new file structure for sass files 2015-10-20 21:15:21 +02:00
index.jsx Add navigation docs 2015-11-01 12:39:49 +01:00
readme.md Proper import path for documentation files 2015-11-10 11:07:43 +01:00
style.scss Add slider documentation 2015-11-01 14:14:36 +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';

const links = [
  { href: 'http://', icon: 'person', label: 'Profile' },
  { href: 'http://', icon: 'inbox', label: 'Inbox'}
];

const actions = [
  { label: 'Alarm', kind: 'raised', icon: 'access-alarm'},
  { label: 'Location', kind: 'raised', accent: true, icon: 'room'}
];

const NavigationTest = () => (
  <div>
    <Navigation type='horizontal' actions={actions} />
    <Navigation type='horizontal' routes={links} />
  </div>
);

Properties

Name Type Default Description
actions Array Array of objects that represent buttons so the keys will be transferred as properties to those.
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.