Function
ToolbarButton
({
onClick,
label,
active,
children,
className,
}: {
onClick: () => void
label: string
active?: boolean
children: React.ReactNode
className?: string
})
Source from the content-addressed store, hash-verified
| 219 | // Small Toolbar Button |
| 220 | |
| 221 | function ToolbarButton({ |
| 222 | onClick, |
| 223 | label, |
| 224 | active, |
| 225 | children, |
| 226 | className, |
| 227 | }: { |
| 228 | onClick: () => void |
| 229 | label: string |
| 230 | active?: boolean |
| 231 | children: React.ReactNode |
| 232 | className?: string |
| 233 | }) { |
| 234 | return ( |
| 235 | <button |
| 236 | type="button" |
| 237 | onClick={onClick} |
| 238 | aria-label={label} |
| 239 | className={cn( |
| 240 | "inline-flex size-7 items-center justify-center rounded-md transition-colors outline-none", |
| 241 | "text-muted-foreground hover:bg-accent hover:text-accent-foreground", |
| 242 | "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1", |
| 243 | active && "bg-accent text-accent-foreground", |
| 244 | className |
| 245 | )} |
| 246 | > |
| 247 | {children} |
| 248 | </button> |
| 249 | ) |
| 250 | } |
| 251 | |
| 252 | // LogViewerTerminal |
| 253 | |
Callers
nothing calls this directly
Tested by
no test coverage detected