PropTypes and refactoring

This commit is contained in:
2021-05-04 19:22:45 -05:00
parent 811f022229
commit ace51f61d1
30 changed files with 491 additions and 279 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import './Text.css';
import PropTypes from 'prop-types';
import React from 'react';
const Text = (props) => {
const styleList = [];
@@ -22,4 +23,12 @@ const Text = (props) => {
return props.noOwner ? text : <div className={'TextOwner'}>{text}</div>;
};
Text.propTypes = {
noOwner: PropTypes.bool,
style: PropTypes.object,
text: PropTypes.string,
textAlign: PropTypes.string,
type: PropTypes.string,
};
export default Text;