need to fix window message

This commit is contained in:
Jade (Rose) Rowland 2024-06-14 14:26:23 -04:00
parent 6c9e0aaa1a
commit 2a2ddf205a
23 changed files with 126 additions and 161 deletions

View file

@ -0,0 +1,23 @@
import cx from '@src/cx.mjs';
export function ButtonGroup({ value, onChange, items }) {
return (
<div className="flex max-w-lg">
{Object.entries(items).map(([key, label], i, arr) => (
<button
key={key}
onClick={() => onChange(key)}
className={cx(
'px-2 border-b h-8 whitespace-nowrap',
// i === 0 && 'rounded-l-md',
// i === arr.length - 1 && 'rounded-r-md',
// value === key ? 'bg-background' : 'bg-lineHighlight',
value === key ? 'border-foreground' : 'border-transparent',
)}
>
{label.toLowerCase()}
</button>
))}
</div>
);
}