Sha256: a13bc327579ef5e79e90a12a7131894c9ba1933d8eaef57cdcc4a151eea2e129
Contents?: true
Size: 916 Bytes
Versions: 35
Compression:
Stored size: 916 Bytes
Contents
import React from 'react'; import { translate as __ } from 'foremanReact/common/I18n'; import { Select, SelectVariant } from '@patternfly/react-core'; import PropTypes from 'prop-types'; const ContentViewSelect = ({ headerText, children, onClear, ...pfSelectProps }) => ( <div style={{ marginTop: '1em' }}> <h3>{headerText}</h3> <Select variant={SelectVariant.typeahead} onClear={onClear} maxHeight="20rem" menuAppendTo="parent" ouiaId="select-content-view" id="selectCV" name="selectCV" aria-label="selectCV" {...pfSelectProps} > {children} </Select> </div> ); ContentViewSelect.propTypes = { headerText: PropTypes.string, onClear: PropTypes.func.isRequired, children: PropTypes.node, }; ContentViewSelect.defaultProps = { headerText: __('Select content view'), children: [], }; export default ContentViewSelect;
Version data entries
35 entries across 35 versions & 1 rubygems