API reference
components/icon-lamp
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/icon-lamp";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | IconLampProps | Props accepted by IconLamp. |
| type alias | IconLampItem | One lamp in an IconLamps row. |
| type alias | IconLampsProps | Props accepted by IconLamps. |
| constant | IconLamp | A read-only icon state: an icon key’s face with no input, for rights or settings shown but not changed here. It reads as “Label: state”. |
| constant | IconLamps | A named row of read-only icon lamps; name it with aria-label(ledby). |
IconLampPropstype alias
Section titled “IconLampProps”type IconLampProps = object & Omit<HTMLAttributes<HTMLElement>, "children">;Props accepted by IconLamp.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
label |
string |
The full name read with the state, such as “Read files”. |
icon |
ReactNode |
- |
caption? |
string |
A short visible legend; it does not replace the accessible label. |
on |
boolean |
Lit: the icon in colour with the ink lamp. Off: the grey silhouette. |
stateLabels? |
readonly [string, string] |
How the state reads aloud, as [on, off]. |
IconLampItemtype alias
Section titled “IconLampItem”type IconLampItem = Omit<IconLampProps, "stateLabels"> & object;One lamp in an IconLamps row.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
id |
string |
IconLampsPropstype alias
Section titled “IconLampsProps”type IconLampsProps = object & Omit<HTMLAttributes<HTMLUListElement>, "children">;Props accepted by IconLamps.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
items |
readonly IconLampItem[] |
stateLabels? |
readonly [string, string] |
IconLampconstant
Section titled “IconLamp”const IconLamp: ForwardRefExoticComponent< object & Omit<HTMLAttributes<HTMLElement>, "children"> & RefAttributes<HTMLElement>>;A read-only icon state: an icon key’s face with no input, for rights or settings shown but not changed here. It reads as “Label: state”.
IconLampsconstant
Section titled “IconLamps”const IconLamps: ForwardRefExoticComponent< object & Omit<HTMLAttributes<HTMLUListElement>, "children"> & RefAttributes<HTMLUListElement>>;A named row of read-only icon lamps; name it with aria-label(ledby).