Sha256: acb5856157fe173f015d45c34e51dadbdcdd1d64db354e1a705edfdcffbdbd79
Contents?: true
Size: 675 Bytes
Versions: 22
Compression:
Stored size: 675 Bytes
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { FormControl } from 'patternfly-react'; import BlankOption from './BlankOption'; const SelectField = ({ input, blank, item, disabled }) => ( <FormControl {...input} componentClass="select" disabled={disabled}> <BlankOption blank={blank} /> {item.selection.map(opt => ( <option key={opt.value} value={opt.value}> {opt.label} </option> ))} </FormControl> ); SelectField.propTypes = { input: PropTypes.object.isRequired, blank: PropTypes.object.isRequired, item: PropTypes.object.isRequired, disabled: PropTypes.bool.isRequired, }; export default SelectField;
Version data entries
22 entries across 22 versions & 1 rubygems