react-toolbox/components/link
Keren Chandran 588ff398bc Updated Link readme and example to include active element. Also changed icon type from string to any. 2016-03-25 10:48:39 -04:00
..
Link.jsx Enabling passing components as icons in all the components 2016-01-22 17:18:59 +01:00
index.js Remove jsx extension from imports in components 2015-11-28 20:24:46 +01:00
readme.md Updated Link readme and example to include active element. Also changed icon type from string to any. 2016-03-25 10:48:39 -04:00
style.scss Allow Link to render Tooltips via children prop 2016-01-05 23:32:38 +01:00

readme.md

Link

The link is a very simple component that acts mostly as a wrapper for the HTML anchor. It's not included in Material Design Specification but we provide it as an easy way to create links with icons and counters. Let's see an example:

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

const LinksTest = () => (
  <nav>
    <Link active href="/#/components/link" label="Work" count={4} icon='business' />
    <Link href="/#/components/link" label="Blog" icon='speaker_notes' />
    <Link href="/#/components/link" label="Explore" icon='explore' />
  </nav>
);

Properties

You can add as many properties as you want to be directly transferred to the output anchor element. Apart from them you have the following properties:

Name Type Default Description
active Boolean false If true, adds active style to link.
className String '' Sets a custom class name to add styles to the link.
count Number Sets a count number.
icon Any An icon key string to include a FontIcon component in front of the text.
label String The text string used for the text content of the link.