PropTypes and refactoring
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user