UNPKG

glass-app-manager

Version:

Informatica's Glass Framework CLI for bootstrapping

29 lines (24 loc) 756 B
// @flow import React, { PureComponent } from "react"; import type { Node } from "react"; type Props = { /** * The title to add for the Card. Pass a function * to have control over the rendering process * (e.g. setting the title as a link). */ title?: string | (() => Node), children: Node, }; export default class CardHeader extends PureComponent<Props> { render() { return ( <div className="d-card__header"> <span className="d-card__header__title"> {typeof this.props.title === "function" ? this.props.title() : this.props.title} </span> {this.props.children} </div> ); } }