Fix header editor and scroll in general

This commit is contained in:
Gregory Schier
2023-03-13 19:37:36 -07:00
parent e2fa188ca3
commit d7ff52038d
13 changed files with 47 additions and 46 deletions

View File

@@ -23,25 +23,21 @@ export function Tabs({ defaultValue, label, children, tabs, className, tabListCl
<T.Root
defaultValue={defaultValue}
onValueChange={setValue}
className={classnames(
className,
// 'h-full overflow-hidden grid grid-rows-[auto_minmax(0,1fr)]',
'h-full flex flex-col min-h-[min-content]',
)}
className={classnames(className, 'h-full grid grid-rows-[auto_minmax(0,1fr)] grid-cols-1')}
>
<T.List
aria-label={label}
className={classnames(tabListClassName, 'h-auto flex items-center')}
className={classnames(tabListClassName, 'h-auto flex items-center overflow-x-auto mb-1 pb-1')}
>
<ScrollArea className="w-full pb-2">
<HStack space={1}>
{tabs.map((t) => (
<TabTrigger key={t.value} value={t.value} active={t.value === value}>
{t.label}
</TabTrigger>
))}
</HStack>
</ScrollArea>
{/*<ScrollArea className="w-full pb-2">*/}
<HStack space={1}>
{tabs.map((t) => (
<TabTrigger key={t.value} value={t.value} active={t.value === value}>
{t.label}
</TabTrigger>
))}
</HStack>
{/*</ScrollArea>*/}
</T.List>
{children}
</T.Root>
@@ -81,7 +77,7 @@ export function TabContent({ value, children, className }: TabContentProps) {
<T.Content
forceMount
value={value}
className={classnames(className, 'tab-content', 'w-full overflow-auto flex-grow h-0')}
className={classnames(className, 'tab-content', 'w-full h-full overflow-auto')}
>
{children}
</T.Content>