Sha256: edb8b95f52d242eb24270b5a1324ea9b7a4b12fca567e4f2681b1ea1e7bd090e
Contents?: true
Size: 837 Bytes
Versions: 58
Compression:
Stored size: 837 Bytes
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { Switch } from '@patternfly/react-core'; import { HelpLabel } from './HelpLabel'; import './SwitcherPF4.scss'; const SwitcherPF4 = ({ id, label, tooltip, isChecked, onChange }) => ( <Switch className="foreman-rh-cloud-switcher" id={`rh-cloud-switcher-${id}`} isChecked={isChecked} onChange={onChange} label={ <div> {label} <HelpLabel text={tooltip} id={id} className="switcher-help-label" /> </div> } /> ); SwitcherPF4.propTypes = { id: PropTypes.string.isRequired, label: PropTypes.string, tooltip: PropTypes.string, isChecked: PropTypes.bool, onChange: PropTypes.func.isRequired, }; SwitcherPF4.defaultProps = { label: null, tooltip: null, isChecked: true, }; export default SwitcherPF4;
Version data entries
58 entries across 58 versions & 1 rubygems