/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/src/Views/Components/Select
NameSizeModeActions
index.js10180644editdlrm
style.module.scss12670644editdlrm
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/src/Views/Components/Select/index.js (1018B)
import PropTypes from 'prop-types'; import classNames from 'classnames'; import style from './style.module.scss'; const Select = ({options, onChange, defaultValue, className, ...rest}) => { const optionElements = options.map((option) => ( )); return (
); }; Select.propTypes = { // Array of objects with labels and values defining select options (ex: {label: Option A, value: option-a}) options: PropTypes.array.isRequired, // Fired on select change event onChange: PropTypes.func, // Default value of select element defaultValue: PropTypes.string.isRequired, // Additional class className: PropTypes.string, }; export default Select;