ddcat1115 8 лет назад
Родитель
Сommit
d9d02c3573
1 измененных файлов с 17 добавлено и 0 удалено
  1. 17 0
      src/components/DescriptionList/Description.js

+ 17 - 0
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;