Skip to content

components/copy-field

CopyFieldProps = object & { fieldLabel?: undefined; displayValue?: undefined; } | { fieldLabel: string; displayValue?: string; } & Omit<HTMLAttributes<HTMLDivElement>>, "children">>

Props accepted by CopyField.

value: string

optional label?: string

Copy action text; the code presentation defaults to “Copy”.

CopyField(__namedParameters): Element

A value with an explicit copy action and visible outcome: wrapped code by default, or a labelled read-only input when fieldLabel is given.

CopyFieldProps

Element