import React from 'react'; import PropTypes from 'prop-types'; import Tooltip from '../../components/tooltip'; const DataTitle: React.FunctionComponent = (props) => { return (
{ props.title } { props.tooltip? : null }
) } DataTitle.propTypes = { title: PropTypes.string, tooltip: PropTypes.string } const DataTitleCopyable: React.FunctionComponent = (props) => { // TODO: remove any return (
{ props.title } { props.tooltip? : null } { (props.copy.copying && props.slug && !props.disabled)?
: null }
); } DataTitleCopyable.propTypes = { title: PropTypes.string, tooltip: PropTypes.string, slug: PropTypes.string, disabled: PropTypes.bool, copy: PropTypes.shape({ copying: PropTypes.bool, copyingKey: PropTypes.func, toggleCopyAttribute: PropTypes.func }) } export default DataTitle; export { DataTitleCopyable }