Skip to content

Commit 539b0a7

Browse files
committed
updates
1 parent f0f9231 commit 539b0a7

File tree

14 files changed

+59
-50
lines changed

14 files changed

+59
-50
lines changed

website/components/access-tokens/AccessTokenCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import dayjs from 'dayjs'
22
import { toast } from 'react-hot-toast'
33
import { useDeleteAccessTokenMutation } from '~/data/access-tokens/delete-access-token'
4-
import Button from '../ui/Button'
4+
import { Button } from '../ui/button'
55

66
export interface ApiTokenCardProps {
77
tokenId: string
@@ -33,7 +33,7 @@ const AccessTokenCard = ({
3333
).fromNow()}`}</div>
3434
</div>
3535
<Button
36-
variant="subtle"
36+
variant="secondary"
3737
onClick={() => deleteAccessToken({ tokenId })}
3838
disabled={isDeletingAccessToken}
3939
>

website/components/forms/FormButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { forwardRef } from 'react'
22
import { useFormState } from 'react-final-form'
33
import { cn } from '~/lib/utils'
4-
import { Button, ButtonProps } from '../ui/Button'
4+
import { Button, ButtonProps } from '../ui/button'
55

66
export interface FormButtonProps extends ButtonProps {}
77

website/components/layouts/Navbar.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { useUser } from '~/lib/auth'
1717
import { getAvatarUrl } from '~/lib/avatars'
1818
import { useTheme } from '../themes/ThemeContext'
1919
import ThemeSwitcher from '../themes/ThemeSwitcher'
20+
import { Button } from '../ui/button'
2021

2122
const Navbar = () => {
2223
const router = useRouter()
@@ -151,16 +152,15 @@ const Navbar = () => {
151152
</DropdownMenuContent>
152153
</DropdownMenu>
153154
) : (
154-
<div className="flex items-center gap-2 sm:gap-4 text-xs sm:text-sm text-gray-600">
155-
<Link href="https://supabase.github.io/dbdev/" target="blank">
156-
Docs
157-
</Link>
158-
<Link
159-
href="/sign-up"
160-
className="text-sm transition hover:text-gray-800 dark:text-slate-400 hover:dark:text-white"
161-
>
162-
Login
163-
</Link>
155+
<div className="flex items-center ">
156+
<Button variant="link" asChild>
157+
<Link href="https://supabase.github.io/dbdev/" target="blank">
158+
Docs
159+
</Link>
160+
</Button>
161+
<Button variant="link" asChild>
162+
<Link href="/sign-up">Login</Link>
163+
</Button>
164164
</div>
165165
)}
166166
</div>

website/components/ui/Button.tsx

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
import * as React from 'react'
2-
import { Slot } from '@radix-ui/react-slot'
3-
import { cva, type VariantProps } from 'class-variance-authority'
4-
import { cn } from '~/lib/utils'
1+
import * as React from "react"
2+
import { Slot } from "@radix-ui/react-slot"
3+
import { cva, type VariantProps } from "class-variance-authority"
4+
5+
import { cn } from "~/lib/utils"
56

67
const buttonVariants = cva(
7-
'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
8+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
89
{
910
variants: {
1011
variant: {
11-
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
12+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
1213
destructive:
13-
'bg-destructive text-destructive-foreground hover:bg-destructive/90',
14+
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
1415
outline:
15-
'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
16+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
1617
secondary:
17-
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
18-
ghost: 'hover:bg-accent hover:text-accent-foreground',
19-
link: 'text-primary underline-offset-4 hover:underline',
18+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
19+
ghost: "hover:bg-accent hover:text-accent-foreground",
20+
link: "text-primary underline-offset-4 hover:underline",
2021
},
2122
size: {
22-
default: 'h-10 px-4 py-2',
23-
sm: 'h-9 rounded-md px-3',
24-
lg: 'h-11 rounded-md px-8',
25-
icon: 'h-10 w-10',
23+
default: "h-10 px-4 py-2",
24+
sm: "h-9 rounded-md px-3",
25+
lg: "h-11 rounded-md px-8",
26+
icon: "h-10 w-10",
2627
},
2728
},
2829
defaultVariants: {
29-
variant: 'default',
30-
size: 'default',
30+
variant: "default",
31+
size: "default",
3132
},
3233
}
3334
)
@@ -40,7 +41,7 @@ export interface ButtonProps
4041

4142
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
4243
({ className, variant, size, asChild = false, ...props }, ref) => {
43-
const Comp = asChild ? Slot : 'button'
44+
const Comp = asChild ? Slot : "button"
4445
return (
4546
<Comp
4647
className={cn(buttonVariants({ variant, size, className }))}
@@ -50,6 +51,6 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
5051
)
5152
}
5253
)
53-
Button.displayName = 'Button'
54+
Button.displayName = "Button"
5455

5556
export { Button, buttonVariants }

website/components/ui/CopyButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const CopyButton = ({
5757
<button
5858
className={cn(
5959
copyButtonVariants({ variant }),
60-
'bg-gray-50 dark:bg-gray-400 dark:hover:bg-gray-200',
60+
'bg-gray-50 text-slate-700 dark:text-slate-100 dark:bg-gray-700 dark:hover:bg-gray-900 transition-colors',
6161
className
6262
)}
6363
onClick={() => {

website/components/ui/Markdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const COPYABLE_CODE_COMPONENTS: MarkdownProps['components'] = {
9292
<CopyButton
9393
getValue={() => childrenToText(children)}
9494
className="absolute top-2 right-2"
95-
variant="dark"
95+
variant="light"
9696
/>
9797
)}
9898

@@ -116,7 +116,7 @@ const Markdown = ({
116116
remarkPlugins={[remarkGfm, ...remarkPlugins]}
117117
rehypePlugins={[rehypeHighlight, ...rehypePlugins]}
118118
linkTarget={linkTarget}
119-
className={cn('prose max-w-none', className)}
119+
className={cn('prose lg:prose-xl max-w-none', className)}
120120
components={{
121121
...DEFAULT_COMPONENTS,
122122
...(copyableCode ? COPYABLE_CODE_COMPONENTS : undefined),

website/pages/404.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Head from 'next/head'
22
import Link from 'next/link'
33
import Layout from '~/components/layouts/Layout'
4-
import Button from '~/components/ui/Button'
4+
import { Button } from '~/components/ui/button'
55
import H1 from '~/components/ui/typography/H1'
66
import P from '~/components/ui/typography/P'
77
import { NextPageWithLayout } from '~/lib/types'

website/pages/[handle]/[package].tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,18 @@ create extension "${pkg?.package_name ?? 'Loading...'}"
8585

8686
<Tabs defaultValue="description">
8787
<TabsList>
88-
<TabsTrigger value="description">Description</TabsTrigger>
89-
<TabsTrigger value="versions">Versions</TabsTrigger>
88+
<TabsTrigger
89+
value="description"
90+
className="data-[state=active]:border-b-2 border-slate-700"
91+
>
92+
Description
93+
</TabsTrigger>
94+
<TabsTrigger
95+
value="versions"
96+
className="data-[state=active]:border-b-2 border-slate-700"
97+
>
98+
Versions
99+
</TabsTrigger>
90100
</TabsList>
91101

92102
<div className="grid grid-cols-1 gap-x-2 md:grid-cols-6">

website/pages/[handle]/_/access-tokens.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Form, { FORM_ERROR } from '~/components/forms/Form'
66
import FormButton from '~/components/forms/FormButton'
77
import FormInput from '~/components/forms/FormInput'
88
import Layout from '~/components/layouts/Layout'
9-
import Button from '~/components/ui/Button'
9+
import { Button } from '~/components/ui/button'
1010
import CopyButton from '~/components/ui/CopyButton'
1111
import H1 from '~/components/ui/typography/H1'
1212
import H3 from '~/components/ui/typography/H3'
@@ -122,7 +122,7 @@ const ApiTokensPage: NextPageWithLayout = () => {
122122
</div>
123123
</Form>
124124
<div className="flex flex-row-reverse">
125-
<Button onClick={onCloseButtonClick} variant="subtle">
125+
<Button onClick={onCloseButtonClick} variant="secondary">
126126
Close
127127
</Button>
128128
</div>
@@ -159,7 +159,7 @@ const ApiTokensPage: NextPageWithLayout = () => {
159159
<Button
160160
type="button"
161161
onClick={onCancelButtonClick}
162-
variant="subtle"
162+
variant="secondary"
163163
className="mt-4"
164164
disabled={disabled}
165165
>

website/pages/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import Head from 'next/head'
44
import Link from 'next/link'
55
import Layout from '~/components/layouts/Layout'
66
import PackageCard from '~/components/packages/PackageCard'
7-
import { Button } from '~/components/ui/Button'
7+
88
import CopyButton from '~/components/ui/CopyButton'
99
import Markdown from '~/components/ui/Markdown'
10+
import { Button } from '~/components/ui/button'
1011
import {
1112
prefetchPopularPackages,
1213
usePopularPackagesQuery,
@@ -44,7 +45,7 @@ const IndexPage: NextPageWithLayout = ({}) => {
4445
</a>
4546
</p>
4647
<div className="flex flex-col sm:flex-row md:items-center mt-6 gap-4">
47-
<Button variant={'default'} asChild>
48+
<Button variant="default" asChild>
4849
<Link href="/installer">Getting started</Link>
4950
</Button>
5051
<Button asChild variant="outline">

0 commit comments

Comments
 (0)