component
PeripheralSelector
Vertical list of inspectable peripherals (the left pane of PeripheralPanel). Renders human-friendly labels via `peripheralLabel` and highlights the current selection.
function PeripheralSelector(props: PeripheralSelectorProps): JSX.ElementProps
| Name | Type | Description |
|---|---|---|
peripherals | string[] | Names of the peripherals to list, in display order. |
selected | string | null | Currently selected peripheral name, or null when nothing is selected. |
onSelect | (name: string) => void | Called with the peripheral name when the user clicks an entry. |
Examples
const [selected, setSelected] = useState<string | null>(null);
<PeripheralSelector peripherals={["kmu", "uicr"]} selected={selected} onSelect={setSelected} />