UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

29 lines (28 loc) 880 B
import type { SpacingProps } from '../../shared/types'; export type CopyOnClickProps = { /** * Whether to show the copy cursor or not. * Default: `true` */ showCursor?: boolean; /** * Whether the CopyOnClick component is on or off. * Default: `false` */ disabled?: boolean; /** * The content to be copied. * Used when the copied value should differ from the visually shown value(`children`). */ copyContent?: React.ReactNode; /** * The message shown in the tooltip when the content is copied. * Defaults to the translation `CopyOnClick.clipboardCopy`. */ tooltipContent?: React.ReactNode; /** * The content/children to be copied. */ children: React.ReactNode; }; export type CopyOnClickAllProps = CopyOnClickProps & SpacingProps & React.HTMLAttributes<HTMLSpanElement>;