diff --git a/src/components/DescriptionList/Description.js b/src/components/DescriptionList/Description.js index 2aae62b24847288a9f662467ea810dcc5b89f831..1061e1a6ae6453d4bf5bfc5e621fa5f0c62c3db6 100644 --- a/src/components/DescriptionList/Description.js +++ b/src/components/DescriptionList/Description.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import classNames from 'classnames'; import { Col } from 'antd'; import styles from './index.less'; @@ -14,4 +15,20 @@ const Description = ({ term, column, className, children, ...restProps }) => { ); }; +Description.defaultProps = { + term: '', + children: '', +}; + +Description.propTypes = { + term: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.element, + ]), + children: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.element, + ]), +}; + export default Description;