Even better layouts

This commit is contained in:
Gregory Schier
2023-03-25 18:33:01 -07:00
parent 402b2a551f
commit 0d82cc7574
6 changed files with 47 additions and 31 deletions

View File

@@ -17,7 +17,7 @@
}
.cm-line {
@apply text-gray-900 pl-1 pr-1.5;
@apply text-gray-800 pl-1 pr-1.5;
}
.cm-placeholder {

View File

@@ -69,6 +69,9 @@ export function Tabs<T>({
<HStack space={1}>
{tabs.map((t) => {
const isActive = t.value === value;
const btnClassName = classnames(
isActive ? 'bg-gray-100 text-gray-800' : 'text-gray-600 hover:text-gray-900',
);
if (t.options) {
return (
<RadioDropdown
@@ -81,9 +84,7 @@ export function Tabs<T>({
color="custom"
size="sm"
onClick={isActive ? undefined : () => handleTabChange(t.value)}
className={classnames(
isActive ? 'bg-gray-100 text-gray-900' : 'text-gray-600 hover:text-gray-900',
)}
className={btnClassName}
>
{t.options.items.find((i) => i.value === t.options?.value)?.label ?? ''}
<Icon icon="triangleDown" className="-mr-1.5" />
@@ -97,9 +98,7 @@ export function Tabs<T>({
color="custom"
size="sm"
onClick={() => handleTabChange(t.value)}
className={classnames(
isActive ? 'bg-gray-100 text-gray-900' : 'text-gray-600 hover:text-gray-900',
)}
className={btnClassName}
>
{t.label}
</Button>