import * as React from 'react';
import * as PropTypes from 'prop-types';

import classNames from '../../../utils/classnames';

export default function Tips({
  // 系统属性
  className,
  // 组件属性
  tips,
  type,
  id,
  style,
}) {
  const cls = classNames({
    'weda-ui': true,
    'weda-tips': true,
    'weui-cells__tips': !!tips,
    'weui-cells__tips_warn': !!tips && type === 'warn',
    [className]: className,
  });

  return (
    <div className={cls} id={id} style={style}>
      {tips}
    </div>
  );
}
