2016-01-26 16:59:57 +03:00
|
|
|
import React from 'react';
|
2016-05-22 20:08:47 +03:00
|
|
|
import classnames from 'classnames';
|
|
|
|
import { themr } from 'react-css-themr';
|
2016-05-29 21:59:54 +03:00
|
|
|
import { LIST } from '../identifiers.js';
|
2016-01-26 16:59:57 +03:00
|
|
|
|
2016-05-22 20:08:47 +03:00
|
|
|
const ListItemText = ({className, primary, children, theme, ...other}) => {
|
|
|
|
const _className = classnames(theme.itemText, {[theme.primary]: primary}, className);
|
2016-01-26 16:59:57 +03:00
|
|
|
return (
|
2016-04-10 12:39:04 +03:00
|
|
|
<span data-react-toolbox="list-item-text" className={_className} {...other}>
|
2016-01-26 16:59:57 +03:00
|
|
|
{children}
|
|
|
|
</span>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
ListItemText.propTypes = {
|
|
|
|
children: React.PropTypes.any,
|
|
|
|
className: React.PropTypes.string,
|
2016-05-22 20:08:47 +03:00
|
|
|
primary: React.PropTypes.bool,
|
|
|
|
theme: React.PropTypes.shape({
|
|
|
|
itemText: React.PropTypes.string.isRequired,
|
|
|
|
primary: React.PropTypes.string.isRequired
|
|
|
|
})
|
2016-01-26 16:59:57 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
ListItemText.defaultProps = {
|
|
|
|
primary: false
|
|
|
|
};
|
|
|
|
|
2016-05-29 21:59:54 +03:00
|
|
|
export default themr(LIST)(ListItemText);
|
|
|
|
export { ListItemText };
|