update prettierrc

pull/3/head
TZGyn 2 years ago
parent 9fcba543cb
commit a768366513
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -3,8 +3,16 @@
"singleQuote": true, "singleQuote": true,
"semi": false, "semi": false,
"trailingComma": "all", "trailingComma": "all",
"printWidth": 80, "printWidth": 70,
"bracketSameLine": true, "bracketSameLine": true,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "plugins": [
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] "prettier-plugin-svelte",
"prettier-plugin-tailwindcss"
],
"overrides": [
{
"files": "*.svelte",
"options": { "parser": "svelte" }
}
]
} }

@ -3,7 +3,9 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> <link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta
name="viewport"
content="width=device-width, initial-scale=1" />
%sveltekit.head% %sveltekit.head%
</head> </head>
<body data-sveltekit-preload-data="hover"> <body data-sveltekit-preload-data="hover">

@ -6,7 +6,12 @@ export const handle: Handle = async ({ event, resolve }) => {
const pathname = event.url.pathname const pathname = event.url.pathname
const allowedPath = ['/login', '/signup', '/api/login', '/api/signup'] const allowedPath = [
'/login',
'/signup',
'/api/login',
'/api/signup',
]
if (pathname === '/login' || pathname === 'signup') { if (pathname === '/login' || pathname === 'signup') {
if (event.locals.user) { if (event.locals.user) {

@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { Separator } from '$lib/components/ui/separator' import { Separator } from '$lib/components/ui/separator'
import ThemeToggle from './theme-toggle.svelte' import ThemeToggle from './theme-toggle.svelte'
import { Button, buttonVariants } from '$lib/components/ui/button' import { Button } from '$lib/components/ui/button'
import * as Avatar from '$lib/components/ui/avatar' import * as Avatar from '$lib/components/ui/avatar'
import * as DropdownMenu from '$lib/components/ui/dropdown-menu' import * as DropdownMenu from '$lib/components/ui/dropdown-menu'
import * as AlertDialog from '$lib/components/ui/alert-dialog' import * as AlertDialog from '$lib/components/ui/alert-dialog'
@ -22,18 +22,25 @@
} }
</script> </script>
<div class="flex h-full min-w-[350px] flex-col justify-between border-r p-4"> <div
class="flex h-full min-w-[350px] flex-col justify-between border-r p-4">
<div> <div>
<div class="flex items-center justify-between pb-16"> <div class="flex items-center justify-between pb-16">
<div class="text-xl font-bold"><a href="/">Shortener</a></div> <div class="text-xl font-bold">
<a href="/">Shortener</a>
</div>
<ThemeToggle /> <ThemeToggle />
</div> </div>
<div class="flex flex-col gap-4"> <div class="flex flex-col gap-4">
<Button variant="ghost" href="/links" class="justify-start text-base" <Button
>Links</Button> variant="ghost"
<Button variant="ghost" href="/projects" class="justify-start text-base " href="/links"
>Projects</Button> class="justify-start text-base">Links</Button>
<Button
variant="ghost"
href="/projects"
class="justify-start text-base ">Projects</Button>
</div> </div>
</div> </div>
@ -67,7 +74,8 @@
<AlertDialog.Root bind:open={dialogOpen}> <AlertDialog.Root bind:open={dialogOpen}>
<AlertDialog.Content> <AlertDialog.Content>
<AlertDialog.Header> <AlertDialog.Header>
<AlertDialog.Title>Are you absolutely sure?</AlertDialog.Title> <AlertDialog.Title
>Are you absolutely sure?</AlertDialog.Title>
<AlertDialog.Description> <AlertDialog.Description>
You are about to log out of this account. You are about to log out of this account.
</AlertDialog.Description> </AlertDialog.Description>
@ -75,7 +83,10 @@
<AlertDialog.Footer> <AlertDialog.Footer>
<AlertDialog.Cancel disabled={isLoading} <AlertDialog.Cancel disabled={isLoading}
>Cancel</AlertDialog.Cancel> >Cancel</AlertDialog.Cancel>
<Button on:click={logout} class="flex gap-2" disabled={isLoading}> <Button
on:click={logout}
class="flex gap-2"
disabled={isLoading}>
{#if isLoading} {#if isLoading}
<Loader2 class="animate-spin" /> <Loader2 class="animate-spin" />
{/if} {/if}

@ -19,7 +19,9 @@
<DropdownMenu.Content> <DropdownMenu.Content>
<DropdownMenu.Item on:click={() => setMode('light')} <DropdownMenu.Item on:click={() => setMode('light')}
>Light</DropdownMenu.Item> >Light</DropdownMenu.Item>
<DropdownMenu.Item on:click={() => setMode('dark')}>Dark</DropdownMenu.Item> <DropdownMenu.Item on:click={() => setMode('dark')}
<DropdownMenu.Item on:click={() => resetMode()}>System</DropdownMenu.Item> >Dark</DropdownMenu.Item>
<DropdownMenu.Item on:click={() => resetMode()}
>System</DropdownMenu.Item>
</DropdownMenu.Content> </DropdownMenu.Content>
</DropdownMenu.Root> </DropdownMenu.Root>

@ -11,7 +11,11 @@
</script> </script>
<AlertDialogPrimitive.Cancel <AlertDialogPrimitive.Cancel
class={cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', className)} class={cn(
buttonVariants({ variant: 'outline' }),
'mt-2 sm:mt-0',
className,
)}
{...$$restProps} {...$$restProps}
on:click on:click
on:keydown on:keydown

@ -9,7 +9,10 @@
</script> </script>
<div <div
class={cn('flex flex-col space-y-2 text-center sm:text-left', className)} class={cn(
'flex flex-col space-y-2 text-center sm:text-left',
className,
)}
{...$$restProps}> {...$$restProps}>
<slot /> <slot />
</div> </div>

@ -16,5 +16,8 @@
<AlertDialogPrimitive.Overlay <AlertDialogPrimitive.Overlay
{transition} {transition}
{transitionConfig} {transitionConfig}
class={cn('fixed inset-0 z-50 bg-background/80 backdrop-blur-sm ', className)} class={cn(
'fixed inset-0 z-50 bg-background/80 backdrop-blur-sm ',
className,
)}
{...$$restProps} /> {...$$restProps} />

@ -12,7 +12,8 @@ const buttonVariants = tv({
'bg-destructive text-destructive-foreground hover:bg-destructive/90', 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
outline: outline:
'border border-input bg-background hover:bg-accent hover:text-accent-foreground', 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', secondary:
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground', ghost: 'hover:bg-accent hover:text-accent-foreground',
link: 'text-primary underline-offset-4 hover:underline', link: 'text-primary underline-offset-4 hover:underline',
}, },

@ -8,6 +8,8 @@
export { className as class } export { className as class }
</script> </script>
<p class={cn('text-sm text-muted-foreground', className)} {...$$restProps}> <p
class={cn('text-sm text-muted-foreground', className)}
{...$$restProps}>
<slot /> <slot />
</p> </p>

@ -8,6 +8,8 @@
export { className as class } export { className as class }
</script> </script>
<div class={cn('flex items-center p-6 pt-0', className)} {...$$restProps}> <div
class={cn('flex items-center p-6 pt-0', className)}
{...$$restProps}>
<slot /> <slot />
</div> </div>

@ -8,6 +8,8 @@
export { className as class } export { className as class }
</script> </script>
<div class={cn('flex flex-col space-y-1.5 p-6', className)} {...$$restProps}> <div
class={cn('flex flex-col space-y-1.5 p-6', className)}
{...$$restProps}>
<slot /> <slot />
</div> </div>

@ -14,7 +14,10 @@
<svelte:element <svelte:element
this={tag} this={tag}
class={cn('text-lg font-semibold leading-none tracking-tight', className)} class={cn(
'text-lg font-semibold leading-none tracking-tight',
className,
)}
{...$$restProps}> {...$$restProps}>
<slot /> <slot />
</svelte:element> </svelte:element>

@ -20,7 +20,9 @@
{...$$restProps} {...$$restProps}
on:click> on:click>
<CheckboxPrimitive.Indicator <CheckboxPrimitive.Indicator
class={cn('flex h-4 w-4 items-center justify-center text-current')} class={cn(
'flex h-4 w-4 items-center justify-center text-current',
)}
let:isChecked let:isChecked
let:isIndeterminate> let:isIndeterminate>
{#if isChecked} {#if isChecked}

@ -9,7 +9,10 @@
</script> </script>
<div <div
class={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} class={cn(
'flex flex-col space-y-1.5 text-center sm:text-left',
className,
)}
{...$$restProps}> {...$$restProps}>
<slot /> <slot />
</div> </div>

@ -16,5 +16,8 @@
<DialogPrimitive.Overlay <DialogPrimitive.Overlay
{transition} {transition}
{transitionConfig} {transitionConfig}
class={cn('fixed inset-0 z-50 bg-background/80 backdrop-blur-sm', className)} class={cn(
'fixed inset-0 z-50 bg-background/80 backdrop-blur-sm',
className,
)}
{...$$restProps} /> {...$$restProps} />

@ -9,7 +9,10 @@
</script> </script>
<DialogPrimitive.Title <DialogPrimitive.Title
class={cn('text-lg font-semibold leading-none tracking-tight', className)} class={cn(
'text-lg font-semibold leading-none tracking-tight',
className,
)}
{...$$restProps}> {...$$restProps}>
<slot /> <slot />
</DialogPrimitive.Title> </DialogPrimitive.Title>

@ -25,7 +25,8 @@
on:pointerdown on:pointerdown
on:pointerleave on:pointerleave
on:pointermove> on:pointermove>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"> <span
class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.CheckboxIndicator> <DropdownMenuPrimitive.CheckboxIndicator>
<Check class="h-4 w-4" /> <Check class="h-4 w-4" />
</DropdownMenuPrimitive.CheckboxIndicator> </DropdownMenuPrimitive.CheckboxIndicator>

@ -12,7 +12,11 @@
</script> </script>
<DropdownMenuPrimitive.Label <DropdownMenuPrimitive.Label
class={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)} class={cn(
'px-2 py-1.5 text-sm font-semibold',
inset && 'pl-8',
className,
)}
{...$$restProps}> {...$$restProps}>
<slot /> <slot />
</DropdownMenuPrimitive.Label> </DropdownMenuPrimitive.Label>

@ -25,7 +25,8 @@
on:pointerdown on:pointerdown
on:pointerleave on:pointerleave
on:pointermove> on:pointermove>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"> <span
class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.RadioIndicator> <DropdownMenuPrimitive.RadioIndicator>
<Circle class="h-2 w-2 fill-current" /> <Circle class="h-2 w-2 fill-current" />
</DropdownMenuPrimitive.RadioIndicator> </DropdownMenuPrimitive.RadioIndicator>

@ -2,7 +2,10 @@
import { getFormField } from 'formsnap' import { getFormField } from 'formsnap'
import type { HTMLTextareaAttributes } from 'svelte/elements' import type { HTMLTextareaAttributes } from 'svelte/elements'
import type { TextareaGetFormField } from '.' import type { TextareaGetFormField } from '.'
import { Textarea, type TextareaEvents } from '$lib/components/ui/textarea' import {
Textarea,
type TextareaEvents,
} from '$lib/components/ui/textarea'
type $$Props = HTMLTextareaAttributes type $$Props = HTMLTextareaAttributes
type $$Events = TextareaEvents type $$Events = TextareaEvents

@ -6,7 +6,8 @@
type $$Props = SelectPrimitive.ContentProps type $$Props = SelectPrimitive.ContentProps
type $$Events = SelectPrimitive.ContentEvents type $$Events = SelectPrimitive.ContentEvents
export let inTransition: $$Props['inTransition'] = flyAndScale export let inTransition: $$Props['inTransition'] = flyAndScale
export let inTransitionConfig: $$Props['inTransitionConfig'] = undefined export let inTransitionConfig: $$Props['inTransitionConfig'] =
undefined
export let outTransition: $$Props['outTransition'] = scale export let outTransition: $$Props['outTransition'] = scale
export let outTransitionConfig: $$Props['outTransitionConfig'] = { export let outTransitionConfig: $$Props['outTransitionConfig'] = {
start: 0.95, start: 0.95,

@ -28,7 +28,8 @@
on:focusout on:focusout
on:pointerleave on:pointerleave
on:pointermove> on:pointermove>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"> <span
class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator> <SelectPrimitive.ItemIndicator>
<Check class="h-4 w-4" /> <Check class="h-4 w-4" />
</SelectPrimitive.ItemIndicator> </SelectPrimitive.ItemIndicator>

@ -13,7 +13,9 @@
<SeparatorPrimitive.Root <SeparatorPrimitive.Root
class={cn( class={cn(
'shrink-0 bg-border', 'shrink-0 bg-border',
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]', orientation === 'horizontal'
? 'h-[1px] w-full'
: 'h-full w-[1px]',
className, className,
)} )}
{orientation} {orientation}

@ -13,7 +13,9 @@ export const shortener = pgTable('shortener', {
id: serial('id').primaryKey().notNull(), id: serial('id').primaryKey().notNull(),
link: varchar('link', { length: 255 }).notNull(), link: varchar('link', { length: 255 }).notNull(),
code: varchar('code', { length: 255 }).notNull(), code: varchar('code', { length: 255 }).notNull(),
createdAt: timestamp('created_at', { mode: 'string' }).defaultNow().notNull(), createdAt: timestamp('created_at', { mode: 'string' })
.defaultNow()
.notNull(),
userId: integer('user_id').notNull(), userId: integer('user_id').notNull(),
}) })
@ -30,21 +32,29 @@ export const user = pgTable('user', {
email: varchar('email', { length: 255 }).notNull().unique(), email: varchar('email', { length: 255 }).notNull().unique(),
username: varchar('username', { length: 255 }), username: varchar('username', { length: 255 }),
password: varchar('password', { length: 255 }).notNull(), password: varchar('password', { length: 255 }).notNull(),
createdAt: timestamp('created_at', { mode: 'string' }).defaultNow().notNull(), createdAt: timestamp('created_at', { mode: 'string' })
.defaultNow()
.notNull(),
}) })
export const visitor = pgTable('visitor', { export const visitor = pgTable('visitor', {
id: serial('id').primaryKey().notNull(), id: serial('id').primaryKey().notNull(),
shortenerId: integer('shortener_id').notNull(), shortenerId: integer('shortener_id').notNull(),
createdAt: timestamp('created_at', { mode: 'string' }).defaultNow().notNull(), createdAt: timestamp('created_at', { mode: 'string' })
countryCode: varchar('country_code', { length: 255 }).notNull(), .defaultNow()
.notNull(),
countryCode: varchar('country_code', {
length: 255,
}).notNull(),
country: varchar('country', { length: 255 }).notNull(), country: varchar('country', { length: 255 }).notNull(),
}) })
export const session = pgTable('session', { export const session = pgTable('session', {
token: varchar('token', { length: 255 }).notNull(), token: varchar('token', { length: 255 }).notNull(),
userId: integer('user_id').notNull(), userId: integer('user_id').notNull(),
expiresAt: timestamp('expires', { mode: 'date' }).notNull(), expiresAt: timestamp('expires', {
mode: 'date',
}).notNull(),
}) })
export const sessionRelations = relations(session, ({ one }) => ({ export const sessionRelations = relations(session, ({ one }) => ({

@ -9,7 +9,10 @@ export const getUserFromSessionToken = async (token: string) => {
.select() .select()
.from(sessionSchema) .from(sessionSchema)
.where( .where(
and(eq(sessionSchema.token, token), gt(sessionSchema.expiresAt, now)), and(
eq(sessionSchema.token, token),
gt(sessionSchema.expiresAt, now),
),
) )
const session = sessions[0] const session = sessions[0]

@ -16,7 +16,12 @@ type FlyAndScaleParams = {
export const flyAndScale = ( export const flyAndScale = (
node: Element, node: Element,
params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 }, params: FlyAndScaleParams = {
y: -8,
x: 0,
start: 0.95,
duration: 150,
},
): TransitionConfig => { ): TransitionConfig => {
const style = getComputedStyle(node) const style = getComputedStyle(node)
const transform = style.transform === 'none' ? '' : style.transform const transform = style.transform === 'none' ? '' : style.transform
@ -50,7 +55,11 @@ export const flyAndScale = (
css: (t) => { css: (t) => {
const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]) const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0])
const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]) const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0])
const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]) const scale = scaleConversion(
t,
[0, 1],
[params.start ?? 0.95, 1],
)
return styleToString({ return styleToString({
transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`, transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`,

@ -1,5 +1,7 @@
import type { LayoutServerLoad } from './$types' import type { LayoutServerLoad } from './$types'
export const load = (async () => { export const load = (async () => {
return { shortener_url: process.env.SHORTENER_URL ?? 's.tzgyn.com' } return {
shortener_url: process.env.SHORTENER_URL ?? 's.tzgyn.com',
}
}) satisfies LayoutServerLoad }) satisfies LayoutServerLoad

@ -1,4 +1,5 @@
<h1 class="text-xl">Welcome to SvelteKit</h1> <h1 class="text-xl">Welcome to SvelteKit</h1>
<p> <p>
Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the
documentation
</p> </p>

@ -9,6 +9,7 @@
<div class="text-4xl font-bold">404</div> <div class="text-4xl font-bold">404</div>
<div class="text-4xl font-bold">Page Not Found</div> <div class="text-4xl font-bold">Page Not Found</div>
</div> </div>
<Button on:click={() => goto('/')} class="w-fit">Return Home</Button> <Button on:click={() => goto('/')} class="w-fit"
>Return Home</Button>
</div> </div>
</div> </div>

@ -3,7 +3,10 @@ import { fail } from '@sveltejs/kit'
import { superValidate } from 'sveltekit-superforms/server' import { superValidate } from 'sveltekit-superforms/server'
import { formSchema } from './schema' import { formSchema } from './schema'
import { db } from '$lib/db' import { db } from '$lib/db'
import { session as sessionSchema, user as userSchema } from '$lib/db/schema' import {
session as sessionSchema,
user as userSchema,
} from '$lib/db/schema'
import { eq } from 'drizzle-orm' import { eq } from 'drizzle-orm'
import { nanoid } from 'nanoid' import { nanoid } from 'nanoid'
import * as argon2 from 'argon2' import * as argon2 from 'argon2'
@ -33,7 +36,8 @@ export const actions: Actions = {
const user = users[0] const user = users[0]
const matchPassword = const matchPassword =
// user && (await Bun.password.verify(form.data.password, user.password)) // user && (await Bun.password.verify(form.data.password, user.password))
user && (await argon2.verify(user.password, form.data.password)) user &&
(await argon2.verify(user.password, form.data.password))
if (user && matchPassword) { if (user && matchPassword) {
const token = nanoid(32) const token = nanoid(32)

@ -8,7 +8,9 @@
export let data: PageData export let data: PageData
const guestLogin = async () => { const guestLogin = async () => {
const response = await fetch('/api/login', { method: 'post' }) const response = await fetch('/api/login', {
method: 'post',
})
const data = await response.json() const data = await response.json()
if (data.success) { if (data.success) {

@ -41,9 +41,10 @@ export const actions: Actions = {
if (!user) { if (!user) {
// const hashedPassword = await Bun.password.hash(form.data.password) // const hashedPassword = await Bun.password.hash(form.data.password)
const hashedPassword = await argon2.hash(form.data.password) const hashedPassword = await argon2.hash(form.data.password)
await db await db.insert(userSchema).values({
.insert(userSchema) email: form.data.email,
.values({ email: form.data.email, password: hashedPassword }) password: hashedPassword,
})
const token = nanoid(32) const token = nanoid(32)
event.cookies.set('token', token, { event.cookies.set('token', token, {
httpOnly: true, httpOnly: true,

@ -22,7 +22,9 @@
<div <div
class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]"> class="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
<div class="flex flex-col space-y-2 text-center"> <div class="flex flex-col space-y-2 text-center">
<h1 class="text-2xl font-semibold tracking-tight">Create an account</h1> <h1 class="text-2xl font-semibold tracking-tight">
Create an account
</h1>
<p class="text-sm text-muted-foreground"> <p class="text-sm text-muted-foreground">
Enter your email below to create your account Enter your email below to create your account
</p> </p>

@ -1,5 +1,8 @@
import type { RequestHandler } from './$types' import type { RequestHandler } from './$types'
import { user as userSchema, session as sessionSchema } from '$lib/db/schema' import {
user as userSchema,
session as sessionSchema,
} from '$lib/db/schema'
import { db } from '$lib/db' import { db } from '$lib/db'
import { nanoid } from 'nanoid' import { nanoid } from 'nanoid'
import { eq } from 'drizzle-orm' import { eq } from 'drizzle-orm'
@ -26,7 +29,9 @@ export const POST: RequestHandler = async (event) => {
const expiresAt = new Date() const expiresAt = new Date()
expiresAt.setTime(expiresAt.getTime() + 4 * 60 * 60 * 1000) expiresAt.setTime(expiresAt.getTime() + 4 * 60 * 60 * 1000)
await db.insert(sessionSchema).values({ userId: user.id, token, expiresAt }) await db
.insert(sessionSchema)
.values({ userId: user.id, token, expiresAt })
event.cookies.set('token', token, { event.cookies.set('token', token, {
httpOnly: true, httpOnly: true,

@ -9,7 +9,10 @@ export const POST: RequestHandler = async (event) => {
const token = event.cookies.get('token') const token = event.cookies.get('token')
if (!token) { if (!token) {
return new Response( return new Response(
JSON.stringify({ success: false, message: 'Invalid User' }), JSON.stringify({
success: false,
message: 'Invalid User',
}),
) )
} }
logoutUser(token) logoutUser(token)

@ -22,15 +22,18 @@ const config = {
foreground: 'hsl(var(--foreground) / <alpha-value>)', foreground: 'hsl(var(--foreground) / <alpha-value>)',
primary: { primary: {
DEFAULT: 'hsl(var(--primary) / <alpha-value>)', DEFAULT: 'hsl(var(--primary) / <alpha-value>)',
foreground: 'hsl(var(--primary-foreground) / <alpha-value>)', foreground:
'hsl(var(--primary-foreground) / <alpha-value>)',
}, },
secondary: { secondary: {
DEFAULT: 'hsl(var(--secondary) / <alpha-value>)', DEFAULT: 'hsl(var(--secondary) / <alpha-value>)',
foreground: 'hsl(var(--secondary-foreground) / <alpha-value>)', foreground:
'hsl(var(--secondary-foreground) / <alpha-value>)',
}, },
destructive: { destructive: {
DEFAULT: 'var(--destructive)', DEFAULT: 'var(--destructive)',
foreground: 'hsl(var(--destructive-foreground) / <alpha-value>)', foreground:
'hsl(var(--destructive-foreground) / <alpha-value>)',
}, },
muted: { muted: {
DEFAULT: 'hsl(var(--muted) / <alpha-value>)', DEFAULT: 'hsl(var(--muted) / <alpha-value>)',
@ -42,7 +45,8 @@ const config = {
}, },
popover: { popover: {
DEFAULT: 'hsl(var(--popover) / <alpha-value>)', DEFAULT: 'hsl(var(--popover) / <alpha-value>)',
foreground: 'hsl(var(--popover-foreground) / <alpha-value>)', foreground:
'hsl(var(--popover-foreground) / <alpha-value>)',
}, },
card: { card: {
DEFAULT: 'hsl(var(--card) / <alpha-value>)', DEFAULT: 'hsl(var(--card) / <alpha-value>)',

Loading…
Cancel
Save