2017-04-17 17:14:17 +03:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2016-05-22 20:08:47 +03:00
|
|
|
import classnames from 'classnames';
|
|
|
|
import { themr } from 'react-css-themr';
|
2017-01-26 20:05:32 +03:00
|
|
|
import { LIST } from '../identifiers';
|
2016-01-26 16:59:57 +03:00
|
|
|
|
2017-01-26 20:05:32 +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 = {
|
2017-01-26 20:05:32 +03:00
|
|
|
children: PropTypes.node,
|
2016-05-29 22:11:04 +03:00
|
|
|
className: PropTypes.string,
|
|
|
|
primary: PropTypes.bool,
|
|
|
|
theme: PropTypes.shape({
|
2016-06-04 00:44:33 +03:00
|
|
|
itemText: PropTypes.string,
|
2017-01-26 20:05:32 +03:00
|
|
|
primary: PropTypes.string,
|
|
|
|
}),
|
2016-01-26 16:59:57 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
ListItemText.defaultProps = {
|
2017-01-26 20:05:32 +03:00
|
|
|
primary: false,
|
2016-01-26 16:59:57 +03:00
|
|
|
};
|
|
|
|
|
2016-05-29 21:59:54 +03:00
|
|
|
export default themr(LIST)(ListItemText);
|
|
|
|
export { ListItemText };
|