mirror of
https://github.com/wassname/talk.git
synced 2026-07-23 13:10:20 +08:00
24 lines
535 B
JavaScript
24 lines
535 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import styles from './Option.css';
|
|
import cn from 'classnames';
|
|
|
|
const Option = ({className, label = '', onClick}) => (
|
|
<li className={cn(styles.option, className)} onClick={onClick} role="menuitem" tabIndex="0">
|
|
{label}
|
|
</li>
|
|
);
|
|
|
|
Option.propTypes = {
|
|
className: PropTypes.string,
|
|
label: PropTypes.string,
|
|
onClick: PropTypes.func,
|
|
value: PropTypes.oneOfType([
|
|
PropTypes.number,
|
|
PropTypes.string,
|
|
PropTypes.bool
|
|
]),
|
|
};
|
|
|
|
export default Option;
|