Sha256: 539d80daa09861d10b998f7b4ca9afbe8d1d7d4bbd9579dfa7dd6dd56a3af65e
Contents?: true
Size: 1.2 KB
Versions: 18
Compression:
Stored size: 1.2 KB
Contents
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { translate as __ } from 'foremanReact/common/I18n'; import { Switch, Icon, FieldLevelHelp } from 'patternfly-react'; import './RecommendedRepositorySetsToggler.scss'; const RecommendedRepositorySetsToggler = ({ enabled, className, children, help, onChange, ...props }) => { const classes = classNames('recommended-repositories-toggler-container', className); return ( <div className={classes} {...props}> <Switch bsSize="mini" value={enabled} onChange={() => onChange(!enabled)} /> <Icon type="fa" name="star" /> {children} <FieldLevelHelp content={help} /> </div> ); }; RecommendedRepositorySetsToggler.propTypes = { enabled: PropTypes.bool, className: PropTypes.string, children: PropTypes.node, help: PropTypes.node, onChange: PropTypes.func, }; RecommendedRepositorySetsToggler.defaultProps = { enabled: false, className: '', children: __('Recommended Repositories'), help: __('This shows repositories that are used in a typical setup.'), onChange: () => null, }; export default RecommendedRepositorySetsToggler;
Version data entries
18 entries across 18 versions & 1 rubygems