xchain-components
Version:
Xchain Components
51 lines (45 loc) • 963 B
JavaScript
/* @flow */
/* eslint react/jsx-filename-extension: 0 */
import * as React from 'react';
type Props = {
displayText: string,
fontWeight?: string | number,
fontSize?: string,
fontStyle?: string,
fontStretch?: string,
lineHeight?: string,
letterSpacing?: string,
color?: string,
onChangeOfValue: ()=> void,
};
const XDisplayText = (props: Props) => {
const {
displayText,
fontWeight, fontSize, fontStyle, fontStretch, lineHeight, letterSpacing, color, onChangeOfValue,
} = props;
return (
<span
style={{
fontWeight,
fontSize,
fontStyle,
fontStretch,
lineHeight,
letterSpacing,
color,
}}
>
{ displayText }
</span>
);
};
XDisplayText.defaultProps = {
fontWeight: 'normal',
fontSize: 'normal',
fontStyle: 'normal',
fontStretch: 'normal',
lineHeight: '1',
letterSpacing: 'normal',
color: 'normal',
};
export default XDisplayText;