Commit d9d02c35 authored by ddcat1115's avatar ddcat1115

add proptypes for Description

parent d8b0a9ec
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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment