react-toolbox/components/list/ListItemText.js

26 lines
595 B
JavaScript
Raw Normal View History

import React from 'react';
import ClassNames from 'classnames';
import style from './style';
const ListItemText = ({className, primary, children, ...other}) => {
const _className = ClassNames(style.itemText, {[style.primary]: primary}, className);
return (
2016-04-10 12:39:04 +03:00
<span data-react-toolbox="list-item-text" className={_className} {...other}>
{children}
</span>
);
};
ListItemText.propTypes = {
children: React.PropTypes.any,
className: React.PropTypes.string,
primary: React.PropTypes.bool
};
ListItemText.defaultProps = {
primary: false
};
export default ListItemText;