-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
634 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { | ||
Tooltip, | ||
TooltipContent, | ||
TooltipProvider, | ||
TooltipTrigger, | ||
} from "@renderer/components/ui/tooltip" | ||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@renderer/components/ui/tabs" | ||
|
||
export function TypeTab() { | ||
return ( | ||
<TooltipProvider delayDuration={300}> | ||
<Tabs defaultValue="articles"> | ||
<TabsList className="w-full justify-around text-xl my-2"> | ||
<TabsTrigger value="articles" className="data-[state=active]:text-indigo-600"> | ||
<Tooltip> | ||
<TooltipTrigger><i className="i-mingcute-news-fill" /></TooltipTrigger> | ||
<TooltipContent side="bottom">Articles</TooltipContent> | ||
</Tooltip> | ||
</TabsTrigger> | ||
<TabsTrigger value="social-media" className="data-[state=active]:text-sky-600"> | ||
<Tooltip> | ||
<TooltipTrigger><i className="i-mingcute-twitter-fill" /></TooltipTrigger> | ||
<TooltipContent side="bottom">Social Media</TooltipContent> | ||
</Tooltip> | ||
</TabsTrigger> | ||
<TabsTrigger value="pictures" className="data-[state=active]:text-green-600"> | ||
<Tooltip> | ||
<TooltipTrigger><i className="i-mingcute-pic-fill" /></TooltipTrigger> | ||
<TooltipContent side="bottom">Pictures</TooltipContent> | ||
</Tooltip> | ||
</TabsTrigger> | ||
<TabsTrigger value="videos" className="data-[state=active]:text-red-600"> | ||
<Tooltip> | ||
<TooltipTrigger><i className="i-mingcute-youtube-fill" /></TooltipTrigger> | ||
<TooltipContent side="bottom">Videos</TooltipContent> | ||
</Tooltip> | ||
</TabsTrigger> | ||
<TabsTrigger value="audios" className="data-[state=active]:text-purple-600"> | ||
<Tooltip> | ||
<TooltipTrigger><i className="i-mingcute-headphone-fill" /></TooltipTrigger> | ||
<TooltipContent side="bottom">Audios</TooltipContent> | ||
</Tooltip> | ||
</TabsTrigger> | ||
<TabsTrigger value="notifications" className="data-[state=active]:text-yellow-600"> | ||
<Tooltip> | ||
<TooltipTrigger><i className="i-mingcute-notification-fill" /></TooltipTrigger> | ||
<TooltipContent side="bottom">Notifications</TooltipContent> | ||
</Tooltip> | ||
</TabsTrigger> | ||
</TabsList> | ||
<TabsContent value="articles">Articles</TabsContent> | ||
<TabsContent value="social-media">Social Media</TabsContent> | ||
<TabsContent value="pictures">Pictures</TabsContent> | ||
<TabsContent value="videos">Videos</TabsContent> | ||
<TabsContent value="audios">Audios</TabsContent> | ||
<TabsContent value="notifications">Notifications</TabsContent> | ||
</Tabs> | ||
</TooltipProvider> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import * as React from "react" | ||
import * as TabsPrimitive from "@radix-ui/react-tabs" | ||
|
||
import { cn } from "@renderer/lib/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 h-10 items-center justify-center text-muted-foreground", | ||
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 | ||
ref={ref} | ||
className={cn( | ||
"inline-flex items-center justify-center whitespace-nowrap data-[state=active]:text-foreground", | ||
className | ||
)} | ||
{...props} | ||
/> | ||
)) | ||
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName | ||
|
||
const TabsContent = React.forwardRef< | ||
React.ElementRef<typeof TabsPrimitive.Content>, | ||
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content> | ||
>(({ className, ...props }, ref) => ( | ||
<TabsPrimitive.Content | ||
ref={ref} | ||
className={cn( | ||
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", | ||
className | ||
)} | ||
{...props} | ||
/> | ||
)) | ||
TabsContent.displayName = TabsPrimitive.Content.displayName | ||
|
||
export { Tabs, TabsList, TabsTrigger, TabsContent } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as React from "react" | ||
import * as TooltipPrimitive from "@radix-ui/react-tooltip" | ||
|
||
import { cn } from "@renderer/lib/utils" | ||
|
||
const TooltipProvider = TooltipPrimitive.Provider | ||
|
||
const Tooltip = TooltipPrimitive.Root | ||
|
||
const TooltipTrigger = TooltipPrimitive.Trigger | ||
|
||
const TooltipContent = React.forwardRef< | ||
React.ElementRef<typeof TooltipPrimitive.Content>, | ||
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> | ||
>(({ className, sideOffset = 4, ...props }, ref) => ( | ||
<TooltipPrimitive.Content | ||
ref={ref} | ||
sideOffset={sideOffset} | ||
className={cn( | ||
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", | ||
className | ||
)} | ||
{...props} | ||
/> | ||
)) | ||
TooltipContent.displayName = TooltipPrimitive.Content.displayName | ||
|
||
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import { | ||
ResizableHandle, | ||
ResizablePanel, | ||
ResizablePanelGroup, | ||
} from "@renderer/components/ui/resizable" | ||
import { TypeTab } from '@renderer/components/type-tab' | ||
|
||
export function Component() { | ||
return ( | ||
<> | ||
<ResizablePanelGroup direction="horizontal"> | ||
<ResizablePanel>One</ResizablePanel> | ||
<ResizableHandle withHandle /> | ||
<ResizablePanel>Two</ResizablePanel> | ||
</ResizablePanelGroup> | ||
</> | ||
<div className="flex h-full"> | ||
<div className="w-80 pt-10 px-3 border-r shrink-0"> | ||
<TypeTab /> | ||
</div> | ||
<div className="w-80 pt-10 px-5 border-r shrink-0">Two</div> | ||
<div className="flex-1 pt-10 px-5">Three</div> | ||
</div> | ||
) | ||
} |