import Markdown from 'markdown-to-jsx'; import React from 'react'; import Tooltip from '../../components/tooltip'; import { CopyProps } from '../data-containers/category-view-props'; import './data-title.css'; interface DataTitleProps { title: string; tooltip: string; } const DataTitle: React.FunctionComponent = (props) => { return (
{ props.title } { props.tooltip? : null }
); }; interface DataTitleCopyableProps { title: string; tooltip?: string; slug: string; slugModifier?: string | number; disabled?: boolean; copy?: CopyProps; } const DataTitleCopyable: React.FunctionComponent = (props) => { return (
{ (props.copy && props.copy.copying && props.slug && !props.disabled)? : null } { props.tooltip? : null }
); }; export default DataTitle; export { DataTitleCopyable };