This repository has been archived on 2025-09-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
repertory-ui/src/components/UI/Text/Text.js
2018-10-03 14:54:05 -05:00

28 lines
609 B
JavaScript

import React from 'react';
import CSSModules from 'react-css-modules';
import styles from './Text.css';
export default CSSModules((props) => {
const styleList = [];
styleList.push('Text');
if (props.type) {
styleList.push(props.type);
}
let style = {...props.style};
if (props.textAlign) {
style['textAlign'] = props.textAlign.toLowerCase();
}
const text = (
<div
styleName={styleList.join(' ')}
style={style}>{props.text}
</div>);
return props.noOwner ? text : (
<div styleName={'TextOwner'}>
{text}
</div>);
}, styles, {allowMultiple: true});