Browse Source

add proptypes for Description

pull/521/head
ddcat1115 8 years ago
parent
commit
d9d02c3573
  1. 17
      src/components/DescriptionList/Description.js

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

Loading…
Cancel
Save