Sha256: e41dd09f0369d7613c8b2ef97c6143512126edec9e8d71ff1f67fbd4fad70550
Contents?: true
Size: 663 Bytes
Versions: 37
Compression:
Stored size: 663 Bytes
Contents
const UIPageActionsButtons = ({ primary, buttons }) => { const className = classNames({ 'ui-page-actions__primary': primary, 'ui-page-actions__secondary': !primary }); const buttonGroupClassName = classNames({ 'button-group': true, 'button-group--right-aligned': primary }); return ( <div className={className}> <div className={buttonGroupClassName}> {buttons.map((button, index) => { return React.cloneElement(button, { key: index}); })} </div> </div> ); }; UIPageActionsButtons.propTypes = { primary: React.PropTypes.bool.isRequired, buttons: React.PropTypes.array.isRequired };
Version data entries
37 entries across 37 versions & 1 rubygems