@brickkit/cli/dashboard
defineDashboard, the UI kit and the data hooks for a dashboard extension.
@brickkit/cli/dashboard exports 63 names: 45 functions, 13 interfaces, 2 types, 3 variables.
import { appFetch, Badge, badgeVariants } from "@brickkit/cli/dashboard";Functions
| Function | Description |
|---|---|
appFetch | Call the app through the dashboard's /app proxy, from the dashboard's own origin. |
Badge | |
Button | |
Card | |
CardAction | |
CardContent | |
CardDescription | |
CardFooter | |
CardHeader | |
CardTitle | |
Checkbox | |
cn | |
createAppClient | The app's typed client, calling it through the dashboard's /app proxy: createAppClient<AppContract>(\{ contract \}), with both from the contract brick dev … |
defineDashboard | Declare the dashboard extension; the module's default export. |
Empty | |
Input | |
Kbd | |
KbdGroup | |
Metric | |
PageHeader | |
Panel | Efferd's card: a square, 1px-bordered surface with a plus mark on each corner, built on the shadcn Card with its radius and ring removed. |
Popover | |
PopoverContent | |
PopoverTrigger | |
Separator | |
SparkBars | Miniature stacked-block bar chart, with the newest column emphasized. |
Table | |
TableBody | |
TableCaption | |
TableCell | |
TableFooter | |
TableHead | |
TableHeader | |
TableRow | |
Toggle | |
ToggleGroup | |
ToggleGroupItem | |
Tooltip | |
TooltipContent | |
TooltipProvider | |
TooltipTrigger | |
useAppFetch | Read path from the app (JSON, or text for anything else) when the component mounts and whenever path changes. |
useAppQuery | Run query when the component mounts and whenever deps change, as useEffect would: useAppQuery((signal) => api.orders.order.list(\{\}, \{ signal \}), []). |
useArchitecture | The app's services, actions and routes as last started; null before it starts. |
useRequests | The requests the dashboard holds live, newest first. |
appFetch
function appFetch(path: string, init?: RequestInit): Promise<Response>Call the app through the dashboard's /app proxy, from the dashboard's own
origin. path is the app's: appFetch("/api/admin/queues").
Parameters
| Name | Type | Description |
|---|---|---|
path | string | |
init? | RequestInit |
Returns Promise<Response>
Source: packages/cli/dashboard/extension.tsx:166
Badge
function Badge(
{ className, variant = "default", render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>,
): ReactElement<unknown, string | JSXElementConstructor<any>>Parameters
| Name | Type | Description |
|---|---|---|
{ className, variant = "default", render, ...props } | useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants> |
Returns ReactElement<unknown, string \| JSXElementConstructor<any>>
Source: packages/cli/dashboard/components/ui/badge.tsx:29
Button
function Button(
{ className, variant = "default", size = "default", ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, variant = "default", size = "default", ...props } | ButtonPrimitive.Props & VariantProps<typeof buttonVariants> |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/button.tsx:42
Card
function Card(
{ className, size = "default", ...props }: React.ComponentProps<"div"> & { size?: "default" | "sm" },
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, size = "default", ...props } | React.ComponentProps<"div"> & { size?: "default" | "sm" } |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/card.tsx:4
CardAction
function CardAction(
{ className, ...props }: React.ComponentProps<"div">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"div"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/card.tsx:58
CardContent
function CardContent(
{ className, ...props }: React.ComponentProps<"div">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"div"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/card.tsx:71
CardDescription
function CardDescription(
{ className, ...props }: React.ComponentProps<"div">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"div"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/card.tsx:48
CardFooter
function CardFooter(
{ className, ...props }: React.ComponentProps<"div">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"div"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/card.tsx:81
CardHeader
function CardHeader(
{ className, ...props }: React.ComponentProps<"div">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"div"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/card.tsx:22
CardTitle
function CardTitle(
{ className, ...props }: React.ComponentProps<"div">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"div"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/card.tsx:35
Checkbox
function Checkbox(
{ className, ...props }: CheckboxPrimitive.Root.Props,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | CheckboxPrimitive.Root.Props |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/checkbox.tsx:5
cn
function cn(...inputs: ClassValue[]): stringParameters
| Name | Type | Description |
|---|---|---|
inputs? | ClassValue[] |
Returns string
Source: packages/cli/dashboard/lib/utils.ts:4
createAppClient
function createAppClient<TApp extends Record<string, any>>(
options: Omit<BrickClientOptions, "baseUrl"> & { contract?: TApp } = {},
): BrickClient<TApp>The app's typed client, calling it through the dashboard's /app proxy:
createAppClient<AppContract>({ contract }), with both from the contract
brick dev generates. CRUD and other plugin routes need the contract
value. Headers, the prefix and timeouts are as for createBrickClient.
Parameters
| Name | Type | Description |
|---|---|---|
options? | Omit<BrickClientOptions, "baseUrl"> & { contract?: TApp } default {} |
Returns BrickClient<TApp>
Source: packages/cli/dashboard/extension.tsx:184
defineDashboard
function defineDashboard<T extends DashboardExtension>(extension: T): TDeclare the dashboard extension; the module's default export.
Parameters
| Name | Type | Description |
|---|---|---|
extension | T |
Returns T
Source: packages/cli/dashboard/extension-registry.ts:95
Empty
function Empty({ title, hint }: { title: string; hint?: string }): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ title, hint } | { title: string; hint?: string } |
Returns JSX.Element
Source: packages/cli/dashboard/components/page-header.tsx:25
Input
function Input(
{ className, type, ...props }: React.ComponentProps<"input">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, type, ...props } | React.ComponentProps<"input"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/input.tsx:5
Kbd
function Kbd({ className, ...props }: React.ComponentProps<"kbd">): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"kbd"> |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/kbd.tsx:3
KbdGroup
function KbdGroup(
{ className, ...props }: React.ComponentProps<"div">,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"div"> |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/kbd.tsx:16
Metric
function Metric(
{ icon, label, value, note, spark }: { icon?: ReactNode; label: string; value: ReactNode; /** A line under the value. */ note?: string; /** Recent values for t…,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ icon, label, value, note, spark, } | { icon?: ReactNode; label: string; value: ReactNode; /** A line under the value. */ note?: string; /** Recent values for the miniature chart; omit for none. */ spark?: number[]; } |
Returns JSX.Element
Source: packages/cli/dashboard/components/metric.tsx:32
PageHeader
function PageHeader(
{ title, description, actions }: { title: string; description?: string; actions?: ReactNode; },
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ title, description, actions, } | { title: string; description?: string; actions?: ReactNode; } |
Returns JSX.Element
Source: packages/cli/dashboard/components/page-header.tsx:3
Panel
function Panel(
{ className, children, title, ...props }: Omit<ComponentProps<"div">, "title"> & { title?: ReactNode },
): JSX.ElementEfferd's card: a square, 1px-bordered surface with a plus mark on each
corner, built on the shadcn Card with its radius and ring removed. A title
is a heading row across the top.
Parameters
| Name | Type | Description |
|---|---|---|
{ className, children, title, ...props } | Omit<ComponentProps<"div">, "title"> & { title?: ReactNode } |
Returns JSX.Element
Source: packages/cli/dashboard/components/panel.tsx:18
Popover
function Popover({ ...props }: PopoverPrimitive.Root.Props): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ ...props } | PopoverPrimitive.Root.Props |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/popover.tsx:6
PopoverContent
function PopoverContent(
{ className, align = "start", alignOffset = 0, side = "bottom", sideOffset = 6, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Pro…,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, align = "start", alignOffset = 0, side = "bottom", sideOffset = 6, ...props } | PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/popover.tsx:14
PopoverTrigger
function PopoverTrigger(
{ ...props }: PopoverPrimitive.Trigger.Props,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ ...props } | PopoverPrimitive.Trigger.Props |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/popover.tsx:10
Separator
function Separator(
{ className, orientation = "horizontal", ...props }: SeparatorPrimitive.Props,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, orientation = "horizontal", ...props } | SeparatorPrimitive.Props |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/separator.tsx:6
SparkBars
function SparkBars({ values }: { values: number[] }): JSX.ElementMiniature stacked-block bar chart, with the newest column emphasized.
Parameters
| Name | Type | Description |
|---|---|---|
{ values } | { values: number[] } |
Returns JSX.Element
Source: packages/cli/dashboard/components/metric.tsx:6
Table
function Table(
{ className, ...props }: React.ComponentProps<"table">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"table"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/table.tsx:6
TableBody
function TableBody(
{ className, ...props }: React.ComponentProps<"tbody">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"tbody"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/table.tsx:31
TableCaption
function TableCaption(
{ className, ...props }: React.ComponentProps<"caption">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"caption"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/table.tsx:93
TableCell
function TableCell(
{ className, ...props }: React.ComponentProps<"td">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"td"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/table.tsx:80
TableFooter
function TableFooter(
{ className, ...props }: React.ComponentProps<"tfoot">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"tfoot"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/table.tsx:41
TableHead
function TableHead(
{ className, ...props }: React.ComponentProps<"th">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"th"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/table.tsx:67
TableHeader
function TableHeader(
{ className, ...props }: React.ComponentProps<"thead">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"thead"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/table.tsx:21
TableRow
function TableRow(
{ className, ...props }: React.ComponentProps<"tr">,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, ...props } | React.ComponentProps<"tr"> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/table.tsx:54
Toggle
function Toggle(
{ className, variant = "default", size = "default", ...props }: TogglePrimitive.Props & VariantProps<typeof toggleVariants>,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, variant = "default", size = "default", ...props } | TogglePrimitive.Props & VariantProps<typeof toggleVariants> |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/toggle.tsx:29
ToggleGroup
function ToggleGroup(
{ className, variant, size, spacing = 2, orientation = "horizontal", children, ...props }: ToggleGroupPrimitive.Props & VariantProps<typeof toggleVariants> & {…,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, variant, size, spacing = 2, orientation = "horizontal", children, ...props } | ToggleGroupPrimitive.Props & VariantProps<typeof toggleVariants> & { spacing?: number; orientation?: "horizontal" | "vertical"; } |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/toggle-group.tsx:23
ToggleGroupItem
function ToggleGroupItem(
{ className, children, variant = "default", size = "default", ...props }: TogglePrimitive.Props & VariantProps<typeof toggleVariants>,
): React.JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, children, variant = "default", size = "default", ...props } | TogglePrimitive.Props & VariantProps<typeof toggleVariants> |
Returns React.JSX.Element
Source: packages/cli/dashboard/components/ui/toggle-group.tsx:59
Tooltip
function Tooltip({ ...props }: TooltipPrimitive.Root.Props): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ ...props } | TooltipPrimitive.Root.Props |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/tooltip.tsx:19
TooltipContent
function TooltipContent(
{ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positi…,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props } | TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/tooltip.tsx:27
TooltipProvider
function TooltipProvider(
{ delay = 0, ...props }: TooltipPrimitive.Provider.Props,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ delay = 0, ...props } | TooltipPrimitive.Provider.Props |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/tooltip.tsx:6
TooltipTrigger
function TooltipTrigger(
{ ...props }: TooltipPrimitive.Trigger.Props,
): JSX.ElementParameters
| Name | Type | Description |
|---|---|---|
{ ...props } | TooltipPrimitive.Trigger.Props |
Returns JSX.Element
Source: packages/cli/dashboard/components/ui/tooltip.tsx:23
useAppFetch
function useAppFetch<T = unknown>(
path: string | null,
init?: RequestInit,
): AppFetchResult<T>Read path from the app (JSON, or text for anything else) when the
component mounts and whenever path changes. A null path waits.
Parameters
| Name | Type | Description |
|---|---|---|
path | string | null | |
init? | RequestInit |
Returns AppFetchResult<T>
Source: packages/cli/dashboard/extension.tsx:242
useAppQuery
function useAppQuery<T>(
query: ((signal: AbortSignal) => Promise<T>) | null,
deps: readonly unknown[],
): AppFetchResult<T>Run query when the component mounts and whenever deps change, as
useEffect would: useAppQuery((signal) => api.orders.order.list({}, { signal }), []).
A null query waits. The signal aborts when deps change or on unmount.
Parameters
| Name | Type | Description |
|---|---|---|
query | ((signal: AbortSignal) => Promise<T>) | null | |
deps | readonly unknown[] |
Returns AppFetchResult<T>
Source: packages/cli/dashboard/extension.tsx:198
useArchitecture
function useArchitecture(): ArchitectureSchema | nullThe app's services, actions and routes as last started; null before it starts.
Returns ArchitectureSchema \| null
Source: packages/cli/dashboard/extension.tsx:158
useRequests
function useRequests(): TraceSummary[]The requests the dashboard holds live, newest first.
Returns TraceSummary[]
Source: packages/cli/dashboard/extension.tsx:153
Interfaces
AppFetchResult
interface AppFetchResult<T>Properties
| Name | Type | Description |
|---|---|---|
data | T | undefined | |
error | Error | undefined | |
loading | boolean | |
refetch | () => void | Fetch again. |
Source: packages/cli/dashboard/extension.tsx:170
DashboardExtension
interface DashboardExtensionProperties
| Name | Type | Description |
|---|---|---|
root? | ComponentType<{ children: ReactNode }> | Wraps the whole dashboard: providers, analytics, feature flags. |
slots? | DashboardSlots | |
pages? | ExtensionPage[] | |
sidebar? | SidebarLink[] |
Source: packages/cli/dashboard/extension-registry.ts:86
DashboardSlots
interface DashboardSlotsThe fixed places an extension can fill.
Properties
| Name | Type | Description |
|---|---|---|
"topbar.start"? | ComponentType<SlotContext> | |
"topbar.end"? | ComponentType<SlotContext> | |
"sidebar.header"? | ComponentType<SidebarSlotContext> | |
"sidebar.footer"? | ComponentType<SidebarSlotContext> | |
"overview.top"? | ComponentType<SlotContext> | |
"request.drawer.tabs"? | DrawerTab[] |
Source: packages/cli/dashboard/extension-registry.ts:41
DrawerTab
interface DrawerTabA tab of the request drawer, beside its own Details.
Properties
| Name | Type | Description |
|---|---|---|
id | string | |
label | string | |
component | ComponentType<DrawerTabContext> |
Source: packages/cli/dashboard/extension-registry.ts:34
DrawerTabContext
interface DrawerTabContext extends SlotContextProperties
| Name | Type | Description |
|---|---|---|
request | TraceSummary | undefined | The request the drawer shows; undefined while its spans load. |
Source: packages/cli/dashboard/extension-registry.ts:28
PageProps
interface PageProps extends SlotContextProperties
| Name | Type | Description |
|---|---|---|
path | string[] | The address after the page's own: #/x/queues/a/b gives ["a", "b"]. |
Source: packages/cli/dashboard/extension-registry.ts:52
Placement
interface PlacementWhere a page or link sits in the sidebar.
Properties
| Name | Type | Description |
|---|---|---|
after? | string | After this page: a built-in one ("overview") or another extension page's id. |
section? | string | Under this heading, below the built-in pages. after wins when both are set. |
production? | boolean | Show it in the production dashboard of brick start too. |
Source: packages/cli/dashboard/extension-registry.ts:58
Route
interface RouteProperties
| Name | Type | Description |
|---|---|---|
view | View | |
traceId? | string | |
path | string[] | Segments after the view, for views with pages of their own (APIs, Docs). For x, after the page's id. |
anchor? | string | The #heading after a docs page's path. |
page? | string | The extension page's id, for x. |
Source: packages/cli/dashboard/state.ts:209
SidebarLink
interface SidebarLink extends PlacementA sidebar link. One to another site opens in a new tab.
Properties
| Name | Type | Description |
|---|---|---|
label | string | |
icon? | ReactNode | |
href | string |
Source: packages/cli/dashboard/extension-registry.ts:80
SidebarSlotContext
interface SidebarSlotContext extends SlotContextProperties
| Name | Type | Description |
|---|---|---|
expanded | boolean | Whether the sidebar shows labels, or only its icon rail. |
Source: packages/cli/dashboard/extension-registry.ts:23
SlotContext
interface SlotContextWhat every slot, page and drawer tab receives.
Properties
| Name | Type | Description |
|---|---|---|
route | Route | Where the dashboard is: #/x/queues/42 is { view: "x", page: "queues", path: ["42"] }. |
theme | "light" | "dark" | The theme in effect, after following the system setting. |
production | boolean | The read-only dashboard of brick start, not brick dev. |
selectedRequestId? | string | The request open in the Requests view, when one is. |
Source: packages/cli/dashboard/extension-registry.ts:12
TraceSpan
interface TraceSpanProperties
| Name | Type | Description |
|---|---|---|
spanId | string | |
parentSpanId? | string | |
name | string | |
startMs | number | |
endMs? | number | |
status | SpanOutcome | |
statusMessage? | string | |
attributes | Attributes | |
events | SpanEventRecord[] |
Source: packages/cli/src/dev-telemetry-store.ts:15
TraceSummary
interface TraceSummaryProperties
| Name | Type | Description |
|---|---|---|
traceId | string | |
name | string | |
method? | string | |
route? | string | |
path? | string | The request's actual path, which differs from a wildcard route template. |
httpStatus? | number | |
generation | number | |
startMs | number | |
endMs? | number | |
durationMs? | number | |
status | SpanOutcome | |
truncated | boolean | |
service? | string | The service and action that handled the request, when it ran one. |
action? | string | |
message? | string | Why it failed, when it did. |
legacyRoute? | boolean | The request used a v0.10 path that brick({ legacyRoutes: true }) still serves. |
spans | TraceSpan[] |
Source: packages/cli/src/dev-telemetry-store.ts:27
Types
ExtensionPage
type ExtensionPage =
| (PageBase & { component: ComponentType<PageProps>; url?: undefined })
/** A page shown in a frame. It cannot fill slots or follow the theme. */
| (PageBase & { url: string; component?: undefined });Source: packages/cli/dashboard/extension-registry.ts:74
SlotName
type SlotName = keyof DashboardSlots;Source: packages/cli/dashboard/extension-registry.ts:50
Variables
badgeVariants
const badgeVariants: (props?: ({ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined; } & ClassProp) | undefined) => stringSource: packages/cli/dashboard/components/ui/badge.tsx:6
buttonVariants
const buttonVariants: (props?: ({ variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined; size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined; } &…Source: packages/cli/dashboard/components/ui/button.tsx:5
toggleVariants
const toggleVariants: (props?: ({ variant?: "default" | "outline" | null | undefined; size?: "default" | "sm" | "lg" | null | undefined; } & ClassProp) | undefined) => string