diff --git a/packages/react/src/components/Copy/Copy.js b/packages/react/src/components/Copy/Copy.tsx similarity index 72% rename from packages/react/src/components/Copy/Copy.js rename to packages/react/src/components/Copy/Copy.tsx index 55c57d5404e1..9ba50c07a0b0 100644 --- a/packages/react/src/components/Copy/Copy.js +++ b/packages/react/src/components/Copy/Copy.tsx @@ -6,7 +6,14 @@ */ import PropTypes from 'prop-types'; -import React, { useState, useEffect, useCallback } from 'react'; +import React, { + useState, + useEffect, + useCallback, + AnimationEventHandler, + MouseEventHandler, + PropsWithChildren, +} from 'react'; import debounce from 'lodash.debounce'; import classnames from 'classnames'; import { composeEventHandlers } from '../../tools/events'; @@ -14,6 +21,49 @@ import { usePrefix } from '../../internal/usePrefix'; import { IconButton } from '../IconButton'; import { noopFn } from '../../internal/noopFn'; +interface CopyProps extends React.ButtonHTMLAttributes { + /** + * Specify how the trigger should align with the tooltip + */ + align?: + | 'top' + | 'top-left' + | 'top-right' + | 'bottom' + | 'bottom-left' + | 'bottom-right' + | 'left' + | 'right'; + + /** + * Specify an optional className to be applied to the underlying `