File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ import type { Meta , StoryObj } from '@storybook/react' ;
2
+ import { CalendarDays } from 'lucide-react' ;
3
+ import { Avatar , AvatarFallback , AvatarImage } from '../avatar' ;
4
+ import { Button } from '../button' ;
5
+ import { HoverCard , HoverCardContent , HoverCardTrigger } from '../hover-card' ;
6
+
7
+ function HoverCardDemo ( ) {
8
+ return (
9
+ < HoverCard >
10
+ < HoverCardTrigger asChild >
11
+ < Button
12
+ variant = 'link'
13
+ className = 'text-foreground'
14
+ >
15
+ @Coderum.dev
16
+ </ Button >
17
+ </ HoverCardTrigger >
18
+ < HoverCardContent
19
+ className = 'w-80'
20
+ align = 'center'
21
+ >
22
+ < div className = 'flex justify-between space-x-4' >
23
+ < Avatar >
24
+ < AvatarImage src = 'https://github.com/vercel.png' />
25
+ < AvatarFallback > VC</ AvatarFallback >
26
+ </ Avatar >
27
+ < div className = 'space-y-1' >
28
+ < h4 className = 'text-sm font-semibold' > @Coderum.dev</ h4 >
29
+ < p className = 'text-sm' > A blogging platform for coders – created and maintained by @Coderum.dev.</ p >
30
+ < div className = 'flex items-center pt-2' >
31
+ < CalendarDays className = 'mr-2 h-4 w-4 opacity-70' /> { ' ' }
32
+ < span className = 'text-muted-foreground text-xs' > Joined December 2024</ span >
33
+ </ div >
34
+ </ div >
35
+ </ div >
36
+ </ HoverCardContent >
37
+ </ HoverCard >
38
+ ) ;
39
+ }
40
+
41
+ const meta = {
42
+ title : 'Coderum/HoverCard' ,
43
+ component : HoverCardDemo ,
44
+ parameters : {
45
+ layout : 'centered' ,
46
+ } ,
47
+ } satisfies Meta < typeof HoverCardDemo > ;
48
+ export default meta ;
49
+
50
+ type Story = StoryObj < typeof meta > ;
51
+
52
+ export const HoverCardExample : Story = { } ;
You can’t perform that action at this time.
0 commit comments