Sha256: 550f0b039cdab1d40094333275d0af37b84674c453d42385e653cb8c35facdbc
Contents?: true
Size: 760 Bytes
Versions: 35
Compression:
Stored size: 760 Bytes
Contents
const CardHeader = ({ title, subheading, children }) => { // If children were provided, insert them as the "action" item on the right // hand side of the header. let actionStackItem = null; if(children) { actionStackItem = ( <UIStackItem> {children} </UIStackItem> ) } return ( <header className="next-card__header"> <UIStack> <UIStackItem fill={true}> <UIHeading subheading={subheading}>{title}</UIHeading> </UIStackItem> {actionStackItem} </UIStack> </header> ); }; CardHeader.propTypes = { title: React.PropTypes.string.isRequired, subheading: React.PropTypes.bool, children: React.PropTypes.node }; CardHeader.defaultProps = { subheading: false };
Version data entries
35 entries across 35 versions & 1 rubygems