feature: move all shadcn related code to src/shared/shadcn
This commit is contained in:
7
src/shared/shadcn/ui/skeleton/index.ts
Normal file
7
src/shared/shadcn/ui/skeleton/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import Root from './skeleton.svelte';
|
||||
|
||||
export {
|
||||
Root,
|
||||
//
|
||||
Root as Skeleton,
|
||||
};
|
||||
22
src/shared/shadcn/ui/skeleton/skeleton.svelte
Normal file
22
src/shared/shadcn/ui/skeleton/skeleton.svelte
Normal file
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
cn,
|
||||
type WithElementRef,
|
||||
type WithoutChildren,
|
||||
} from '$shared/shadcn/utils/shadcn-utils.js';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
let {
|
||||
ref = $bindable(null),
|
||||
class: className,
|
||||
...restProps
|
||||
}: WithoutChildren<WithElementRef<HTMLAttributes<HTMLDivElement>>> = $props();
|
||||
</script>
|
||||
|
||||
<div
|
||||
bind:this={ref}
|
||||
data-slot="skeleton"
|
||||
class={cn('bg-accent animate-pulse rounded-md', className)}
|
||||
{...restProps}
|
||||
>
|
||||
</div>
|
||||
Reference in New Issue
Block a user