mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-11 03:54:23 +01:00
* fix: cursor pointer not applying correct in the root component * fix: add cursor-not-allowed to disabled state in SendButton component * feat: update Dropdown to ariakit and changed LLM error's style * feat: switched to ariakit's Dropdown and style improvements * feat: archive updates * refactor: delete conversations in archive * refactor: settings * add cool settings animation * a11y: settings update * style: update settings * style: settings account settings menu; a11y(AccountSettings): switched to AriaKit * a11y: account settings update * style: update my files dialog * fix: tests * chore: remove console.log() --------- Co-authored-by: Danny Avila <danny@librechat.ai>
45 lines
1.7 KiB
TypeScript
45 lines
1.7 KiB
TypeScript
import * as React from 'react';
|
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
import { cn } from '~/utils';
|
|
|
|
const Tabs = TabsPrimitive.Root;
|
|
|
|
const TabsList = React.forwardRef<
|
|
React.ElementRef<typeof TabsPrimitive.List>,
|
|
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
>(({ className = '', ...props }, ref) => (
|
|
<TabsPrimitive.List
|
|
ref={ref}
|
|
className={cn(
|
|
'inline-flex items-center justify-center rounded-md bg-surface-primary',
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
));
|
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
|
|
const TabsTrigger = React.forwardRef<
|
|
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
|
>(({ className = '', ...props }, ref) => (
|
|
<TabsPrimitive.Trigger
|
|
className={cn(
|
|
'inline-flex min-w-[100px] items-center justify-center rounded-[0.185rem] px-3 py-1.5 text-sm font-medium text-gray-700 transition-all disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-gray-800 data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-700 dark:data-[state=active]:text-gray-200',
|
|
className,
|
|
)}
|
|
{...props}
|
|
ref={ref}
|
|
/>
|
|
));
|
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
|
|
const TabsContent = React.forwardRef<
|
|
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
>(({ className = '', ...props }, ref) => (
|
|
<TabsPrimitive.Content className={cn('mt-2 rounded-md p-6', className)} {...props} ref={ref} />
|
|
));
|
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
|
export { Tabs, TabsList, TabsTrigger, TabsContent };
|