Initial commit: Hermes Chat App with Svelte 5 + shadcn-svelte
This commit is contained in:
17
src/lib/components/ui/tabs/tabs-trigger.svelte
Normal file
17
src/lib/components/ui/tabs/tabs-trigger.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<script lang="ts">
|
||||
import { cn } from "$lib/utils.js";
|
||||
import type { HTMLButtonAttributes } from "svelte/elements";
|
||||
let { class: className = "", value = "", selected = false, onclick, children, ...rest }: HTMLButtonAttributes & { value?: string; selected?: boolean } = $props();
|
||||
</script>
|
||||
<button
|
||||
class={cn(
|
||||
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all",
|
||||
"disabled:pointer-events-none disabled:opacity-50",
|
||||
selected ? "bg-background text-foreground shadow-sm" : "hover:bg-background/50 hover:text-foreground",
|
||||
className
|
||||
)}
|
||||
{onclick}
|
||||
{...rest}
|
||||
>
|
||||
{@render children?.()}
|
||||
</button>
|
||||
Reference in New Issue
Block a user