Sha256: fdd45778f4899959e6db5a596545a4a05601c7e09184b84103855ec5f62a5680
Contents?: true
Size: 800 Bytes
Versions: 18
Compression:
Stored size: 800 Bytes
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { Button } from '@patternfly/react-core'; const NameToEditCell = ({ active, id, name, controller, onClick, children }) => active ? ( <Button variant="link" isInline component="span" onClick={() => onClick(id)} > {children} </Button> ) : ( <Button variant="link" isInline isDisabled component="span"> {children} </Button> ); NameToEditCell.propTypes = { active: PropTypes.bool, id: PropTypes.number.isRequired, name: PropTypes.string.isRequired, controller: PropTypes.string.isRequired, onClick: PropTypes.func.isRequired, children: PropTypes.node, }; NameToEditCell.defaultProps = { active: false, children: null, }; export default NameToEditCell;
Version data entries
18 entries across 18 versions & 1 rubygems