import * as React from "react"; interface ChildProps { onClick: () => void; } export interface ClickToCopyBaseProps { /** * This is what will end up on the user's clipboard */ textToCopy: string; /** * Function to execute after text has been copied */ onCopy?: () => void; /** * Content to show */ tooltipContent?: React.ReactNode; /** * Custom ID used for tooltip's id and aria attributes */ tooltipId?: string; } interface ClickToCopyProps extends ClickToCopyBaseProps { /** * Render props to display content and trigger copy using onClick prop */ children: (props: ChildProps) => JSX.Element; } /** * Consumers of this component should provide a child render prop function * that takes a function parameter and returns a component that executes that function using * a trigger element such as a button with an onClick handler. */ declare const ClickToCopy: ({ textToCopy, onCopy, children, tooltipId, tooltipContent }: ClickToCopyProps) => React.JSX.Element; export default ClickToCopy;