Skip to content

Commit cf83661

Browse files
display websites as links
1 parent 1142ada commit cf83661

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/components/ui/accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function AccordionContent({
5555
return (
5656
<AccordionPrimitive.Content
5757
data-slot="accordion-content"
58-
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
58+
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down text-sm"
5959
{...props}
6060
>
6161
<div className={cn('pt-0 pb-4', className)}>{children}</div>

src/components/ui/button.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const buttonVariants = cva(
2424
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
2525
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
2626
icon: 'size-9',
27+
link: 'px-2 py-1 -mx-2 -my-1 underline text-small',
2728
},
2829
},
2930
defaultVariants: {

src/components/users/Users.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { useCallback, useContext, useState } from 'react'
2+
import Link from 'next/link'
23
import {
34
Accordion,
45
AccordionContent,
56
AccordionItem,
67
AccordionTrigger,
78
} from '@/components/ui/accordion'
9+
import { Button } from '@/components/ui/button'
810
import {
911
Card,
1012
CardContent,
@@ -82,7 +84,12 @@ const Users = () => {
8284
<p>{item.company.bs}</p>
8385
</CardContent>
8486
<CardFooter>
85-
{item.website}
87+
<Button
88+
variant="link"
89+
size="link"
90+
>
91+
{item.website}
92+
</Button>
8693
</CardFooter>
8794
</Card>
8895
))
@@ -154,11 +161,14 @@ const Users = () => {
154161
</p>
155162
</CardDescription>
156163
<CardFooter className="px-0">
157-
<p>
164+
<Button
165+
variant="link"
166+
size="link"
167+
>
158168
{
159169
item.website
160170
}
161-
</p>
171+
</Button>
162172
</CardFooter>
163173
</AccordionContent>
164174
</AccordionItem>

0 commit comments

Comments
 (0)