/** * Copyright IBM Corp. 2016, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import PropTypes from 'prop-types'; import { MouseEventHandler } from 'react'; import { ButtonProps } from '../Button'; import type { DeprecatedPopoverAlignment, NewPopoverAlignment, PopoverAlignment } from '../Popover'; export type DeprecatedCopyButtonAlignment = DeprecatedPopoverAlignment; export type NewCopyButtonAlignment = NewPopoverAlignment; export type CopyButtonAlignment = PopoverAlignment; export interface CopyButtonProps extends ButtonProps<'button'> { /** * Specify how the trigger should align with the tooltip */ align?: CopyButtonAlignment; /** * **Experimental**: Will attempt to automatically align the tooltip. Requires React v17+ * @see https://github.com/carbon-design-system/carbon/issues/18714 */ autoAlign?: boolean; /** * Specify an optional className to be applied to the underlying `