API reference
components/copy-field
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/copy-field";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | CopyFieldTokenKind | The colour role of one run of text in a block’s code. |
| type alias | CopyFieldToken | One run of a block’s code; the runs, joined, are the copied value. |
| type alias | CopyFieldProps | Props accepted by CopyField. |
| function | CopyField() | A value with an explicit copy action and visible outcome: wrapped code by
default, a labelled read-only input when fieldLabel is given, or a titled code
panel with layout="block". |
CopyFieldTokenKindtype alias
Section titled “CopyFieldTokenKind”type CopyFieldTokenKind = "text" | "tag" | "attribute" | "string";The colour role of one run of text in a block’s code.
CopyFieldTokentype alias
Section titled “CopyFieldToken”type CopyFieldToken = object;One run of a block’s code; the runs, joined, are the copied value.
Properties
Section titled “Properties”kind: CopyFieldTokenKind;text: string;CopyFieldPropstype alias
Section titled “CopyFieldProps”type CopyFieldProps = object & | { value: string; fieldLabel?: undefined; displayValue?: undefined; layout?: "inline"; title?: undefined; tokens?: undefined;} | { value: string; fieldLabel: string; displayValue?: string; layout?: "inline"; title?: undefined; tokens?: undefined;} | object & | { value: string; tokens?: undefined;} | { tokens: readonly CopyFieldToken[]; value?: undefined;} & Omit<HTMLAttributes<HTMLElement>, "children" | "title">;Props accepted by CopyField.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
label? |
string |
Copy action text; the code presentations default to “Copy”. |
CopyField()function
Section titled “CopyField()”function CopyField(__namedParameters): Element;A value with an explicit copy action and visible outcome: wrapped code by
default, a labelled read-only input when fieldLabel is given, or a titled code
panel with layout="block".
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters |
CopyFieldProps |
Returns
Section titled “Returns”Element