Skip to content

Commit

Permalink
🔧 Fixed fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nwrenger committed Aug 29, 2024
1 parent ab5787b commit ba0bc6d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions src/lib/components/ui/alert/alert-description.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
import { cn } from "$lib/utils.js";
import type { HTMLAttributes } from 'svelte/elements';
import { cn } from '$lib/utils.js';
type $$Props = HTMLAttributes<HTMLDivElement>;
let className: $$Props["class"] = undefined;
let className: $$Props['class'] = undefined;
export { className as class };
</script>

<div class={cn("text-sm [&_p]:leading-relaxed", className)} {...$$restProps}>
<div class={cn('text-sm [&_p]:leading-relaxed', className)} {...$$restProps}>
<slot />
</div>
12 changes: 6 additions & 6 deletions src/lib/components/ui/alert/alert-title.svelte
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
import type { HeadingLevel } from "./index.js";
import { cn } from "$lib/utils.js";
import type { HTMLAttributes } from 'svelte/elements';
import type { HeadingLevel } from './index.js';
import { cn } from '$lib/utils.js';
type $$Props = HTMLAttributes<HTMLHeadingElement> & {
level?: HeadingLevel;
};
let className: $$Props["class"] = undefined;
export let level: $$Props["level"] = "h5";
let className: $$Props['class'] = undefined;
export let level: $$Props['level'] = 'h5';
export { className as class };
</script>

<svelte:element
this={level}
class={cn("mb-1 font-medium leading-none tracking-tight", className)}
class={cn('mb-1 font-medium leading-none tracking-tight', className)}
{...$$restProps}
>
<slot />
Expand Down
10 changes: 5 additions & 5 deletions src/lib/components/ui/alert/alert.svelte
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script lang="ts">
import type { HTMLAttributes } from "svelte/elements";
import { type Variant, alertVariants } from "./index.js";
import { cn } from "$lib/utils.js";
import type { HTMLAttributes } from 'svelte/elements';
import { type Variant, alertVariants } from './index.js';
import { cn } from '$lib/utils.js';
type $$Props = HTMLAttributes<HTMLDivElement> & {
variant?: Variant;
};
let className: $$Props["class"] = undefined;
export let variant: $$Props["variant"] = "default";
let className: $$Props['class'] = undefined;
export let variant: $$Props['variant'] = 'default';
export { className as class };
</script>

Expand Down
26 changes: 13 additions & 13 deletions src/lib/components/ui/alert/index.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { type VariantProps, tv } from "tailwind-variants";
import { type VariantProps, tv } from 'tailwind-variants';

import Root from "./alert.svelte";
import Description from "./alert-description.svelte";
import Title from "./alert-title.svelte";
import Root from './alert.svelte';
import Description from './alert-description.svelte';
import Title from './alert-title.svelte';

export const alertVariants = tv({
base: "[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",
base: '[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4',

variants: {
variant: {
default: "bg-background text-foreground",
default: 'bg-background text-foreground',
destructive:
"border-destructive/50 text-destructive text-destructive dark:border-destructive [&>svg]:text-destructive",
},
'border-destructive/50 text-destructive text-destructive dark:border-destructive [&>svg]:text-destructive'
}
},
defaultVariants: {
variant: "default",
},
variant: 'default'
}
});

export type Variant = VariantProps<typeof alertVariants>["variant"];
export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
export type Variant = VariantProps<typeof alertVariants>['variant'];
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';

export {
Root,
Expand All @@ -29,5 +29,5 @@ export {
//
Root as Alert,
Description as AlertDescription,
Title as AlertTitle,
Title as AlertTitle
};

0 comments on commit ba0bc6d

Please sign in to comment.