Updated Link readme and example to include active element. Also changed icon type from string to any.

old
Keren Chandran 2016-03-25 10:48:39 -04:00
parent 21dc421d73
commit 588ff398bc
2 changed files with 8 additions and 8 deletions

View File

@ -8,7 +8,7 @@ import Link from 'react-toolbox/lib/link';
const LinksTest = () => (
<nav>
<Link href="/#/components/link" label="Work" count={4} icon='business' />
<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>
@ -19,10 +19,10 @@ const LinksTest = () => (
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|
| Name | Type | Default | Description|
|:-----|:-----|:-----|:-----|
| `label` | `String` | | The text string used for the text content of the link.|
| `className` | `String` | `''` | Sets a custom class name to add styles to the link.|
| `count` | `Number` | | Sets a count number useful to display in the page how many times was visited for example.|
| `icon` | `String` | | An icon key string to include a `FontIcon` component in front of the text.|
| `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.|

View File

@ -1,6 +1,6 @@
const LinksTest = () => (
<nav>
<Link href="#/components/link" label="Work" count={4} icon='business' />
<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>