TreeButtoncomponent
TreeButton({ name, children, small = true, plain = true, ...variants }: TreeButtonProps): ReactElement| Param | Type | |
|---|---|---|
variants | TreeButtonProps | Props for the TreeButton component — the element reference plus button variants. required |
.name | string | Reference to an element in the tree — a flat key ( "Store", "Store.get") or a canonical path ("/schema/BooleanSchema"). required readonly |
.children | ReactNode | Visible label — defaults to the resolved element's title, falling back to name. readonly |
| Return | |
|---|---|
ReactElement | A <Button> element linking to the resolved element, or a plain label on a miss. |
Small button linking to a specific tree element, resolved by reference string.
- Resolves
nameviagetTreeElement()— by flat key ("Store","Store.get") or canonical path ("/schema/BooleanSchema"), falling back to the bare name for a single generic type ("Schema<T>"→"Schema") — and links to the element's canonicalpath. - A hit becomes an
<a>link; a miss (e.g. a builtin likeSerializable, or a compound type likeFoo | null) stays a plain non-link label so it still reads as text. - Defaults to
small plainstyling; pass otherButtonVariantsto override.
Examples
<TreeButton name="Store.get">Store.get()</TreeButton>