// @flow import React, { type Node } from 'react' import styled from 'react-emotion' import withProps from 'recompose/withProps' import { color, height, space } from 'styled-system' import Absolute from '../../elements/Absolute' import Avatar from '../Avatar' import { shouldForwardProp } from '../../utils' const Header = withProps({ height: 40, })(styled('header', { shouldForwardProp })( { position: 'relative', flex: 'none', }, color, space, height, )) type Props = { chartIcon?: () => Node, fullName?: string, initials?: string, children?: Node, } const avatarHeight = 48 const CardHeader = ({ chartIcon, fullName, initials, children, ...styles }: Props) => (
{ children } { chartIcon && chartIcon() }
) CardHeader.defaultProps = { children: undefined, chartIcon: () => null, fullName: '', initials: '', } export default CardHeader