/** @jsx jsx */ import { css, jsx } from '@emotion/core'; import * as React from 'react'; // @ts-ignore import COLORS from '../../constants/colors'; import { CircleIconAtom, TextAtom, IconAtom } from '../../atoms'; interface IProps { className?: any; css?: any; title?: any; info?: any; iconName?: any; tooltip?: string; } const tooltipWrapper = css` width: auto; height: auto; margin: 0 0 0 15px; ~ .tooltipBox { display: none; } &:hover { .tooltipIcon { color: #645aff; } ~ .tooltipBox { display: block; } } `; const iconStyle = css` color: #b8c2cc; cursor: pointer; `; const tooltipBoxStyle = css` position: absolute; right: 0; bottom: 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 180px; padding: 20px; background-color: #fff; border-radius: 5px; box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.16); span { font-size: 12px; line-height: 1.2rem; } `; class WidgetOverviewCardMolecule extends React.PureComponent { public state = {}; public render() { const { className = '', tooltip } = this.props; return (
{this.props.title} {tooltip && (
{tooltip}
)}
{this.props.info}
); } } export { WidgetOverviewCardMolecule };