Function
ButtonGroupItem
({
children,
selected,
onClick,
}: PropsWithChildren<ButtonGroupItemProps>)
Source from the content-addressed store, hash-verified
| 20 | } |
| 21 | |
| 22 | export function ButtonGroupItem({ |
| 23 | children, |
| 24 | selected, |
| 25 | onClick, |
| 26 | }: PropsWithChildren<ButtonGroupItemProps>) { |
| 27 | return ( |
| 28 | <button |
| 29 | onClick={onClick} |
| 30 | className={cn( |
| 31 | `flex h-7 cursor-pointer items-center rounded-sm px-2 text-sm text-neutral-600 transition-all hover:bg-neutral-200 dark:text-neutral-400 hover:dark:bg-neutral-800`, |
| 32 | { |
| 33 | "bg-neutral-200 dark:bg-neutral-800": selected, |
| 34 | } |
| 35 | )} |
| 36 | > |
| 37 | {children} |
| 38 | </button> |
| 39 | ); |
| 40 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected