Removed react-css-modules
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import React from 'react';
|
||||
import CSSModules from 'react-css-modules';
|
||||
import styles from './Text.css';
|
||||
import './Text.css';
|
||||
|
||||
export default CSSModules((props) => {
|
||||
export default props => {
|
||||
const styleList = [];
|
||||
styleList.push('Text');
|
||||
if (props.type) {
|
||||
styleList.push(props.type);
|
||||
styleList.push('Text' + props.type);
|
||||
}
|
||||
|
||||
let style = {...props.style};
|
||||
@@ -16,13 +15,12 @@ export default CSSModules((props) => {
|
||||
|
||||
const text = (
|
||||
<div
|
||||
styleName={styleList.join(' ')}
|
||||
className={styleList.join(' ')}
|
||||
style={style}>{props.text}
|
||||
</div>);
|
||||
|
||||
return props.noOwner ? text : (
|
||||
<div styleName={'TextOwner'}>
|
||||
<div className={'TextOwner'}>
|
||||
{text}
|
||||
</div>);
|
||||
|
||||
}, styles, {allowMultiple: true});
|
||||
};
|
||||
Reference in New Issue
Block a user