diff --git a/packages/core/src/components/CopyTextButton/CopyTextButton.tsx b/packages/core/src/components/CopyTextButton/CopyTextButton.tsx index c88ab7221e..86c3778d26 100644 --- a/packages/core/src/components/CopyTextButton/CopyTextButton.tsx +++ b/packages/core/src/components/CopyTextButton/CopyTextButton.tsx @@ -16,6 +16,7 @@ import React, { FC, useRef, useState } from 'react'; import { IconButton, makeStyles, Tooltip } from '@material-ui/core'; +import PropTypes from 'prop-types'; import CopyIcon from '@material-ui/icons/FileCopy'; import { BackstageTheme } from '@backstage/theme'; import { errorApiRef, useApi } from 'api'; @@ -103,4 +104,11 @@ const CopyTextButton: FC = props => { ); }; +// Type check for the JS files using this core component +CopyTextButton.propTypes = { + text: PropTypes.string.isRequired, + tooltipDelay: PropTypes.number, + tooltipText: PropTypes.string, +}; + export default CopyTextButton;