a primitive for creating a Toolbar component.
const { toolbarProps} = createToolbar<T extends HTMLElement>(args: ToolbarArguments, ref: Accessor<T | null>): AriaToolbar; const { toolbarProps, toolbarRef} = createToolbar<T extends HTMLElement>(args: ToolbarArguments): AriaToolbarWithRef<T>;
string
'horizontal' | 'vertical'
JSX.HTMLAttributes<T>
(node: T) => void
import { createToolbar, type ToolbarArguments } from "solid-apg/toolbar"; import type { VoidComponent } from "solid-js"; type ToolbarProps = ToolbarArguments; export const Toolbar: VoidComponent<ToolbarProps> = (props) => { const { toolbarProps, toolbarRef } = createToolbar<HTMLDivElement>(props); return ( <div class="dark:bg-slate-100 bg-slate-900 p-4 flex gap-4 flex-wrap" use:toolbarRef {...toolbarProps}> <button class="btn" onClick={() => alert("Bold")}> Bold </button> <button class="btn" onClick={() => alert("Italics")}> Italics </button> <button class="btn" disabled> Underline </button> <button class="btn">Exit</button> </div> );};