Use Classnames in Link

old
Javi Velasco 2015-11-28 15:55:09 +01:00
parent 2dae5b72fd
commit bf726ba088
1 changed files with 3 additions and 8 deletions

View File

@ -1,17 +1,12 @@
import React from 'react';
import ClassNames from 'classnames';
import style from './style';
import FontIcon from '../font_icon';
const Link = (props) => {
let className = style.root;
if (props.className) className += ` ${props.className}`;
const className = ClassNames(style.root, props.className);
return (
<a
{...props}
data-react-toolbox='link'
className={className}
>
<a {...props} data-react-toolbox='link'className={className}>
{props.icon ? <FontIcon className={style.icon} value={props.icon} /> : null}
{props.label ? <abbr>{props.label}</abbr> : null}
{props.count && parseInt(props.count) !== 0 ? <small>{props.count}</small> : null}