feat: FE solid-ui (shadcn port) — Tailwind + 14 components, all pages rewritten
CI / go test + web typecheck (push) Canceled after 0s
CI / build + deploy (Nix) — flowsight (push) Canceled after 0s

This commit is contained in:
asepharyana committed 2026-09-15 17:40:39 +07:00
1 parent debc907188
commit 8392dbe724
34 files changed
+2390 -542

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
import type { ValidComponent } from "solid-js"
import { splitProps } from "solid-js"
import * as ImagePrimitive from "@kobalte/core/image"
import type { PolymorphicProps } from "@kobalte/core/polymorphic"
import { cn } from "../../lib/utils"
type AvatarRootProps<T extends ValidComponent = "span"> = ImagePrimitive.ImageRootProps<T> & {
class?: string | undefined
}
const Avatar = <T extends ValidComponent = "span">(
props: PolymorphicProps<T, AvatarRootProps<T>>
) => {
const [local, others] = splitProps(props as AvatarRootProps, ["class"])
return (
<ImagePrimitive.Root
class={cn("relative flex size-10 shrink-0 overflow-hidden rounded-full", local.class)}
{...others}
/>
)
}
type AvatarImageProps<T extends ValidComponent = "img"> = ImagePrimitive.ImageImgProps<T> & {
class?: string | undefined
}
const AvatarImage = <T extends ValidComponent = "img">(
props: PolymorphicProps<T, AvatarImageProps<T>>
) => {
const [local, others] = splitProps(props as AvatarImageProps, ["class"])
return <ImagePrimitive.Img class={cn("aspect-square size-full", local.class)} {...others} />
}
type AvatarFallbackProps<T extends ValidComponent = "span"> =
ImagePrimitive.ImageFallbackProps<T> & { class?: string | undefined }
const AvatarFallback = <T extends ValidComponent = "span">(
props: PolymorphicProps<T, AvatarFallbackProps<T>>
) => {
const [local, others] = splitProps(props as AvatarFallbackProps, ["class"])
return (
<ImagePrimitive.Fallback
class={cn("flex size-full items-center justify-center bg-muted", local.class)}
{...others}
/>
)
}
export { Avatar, AvatarImage, AvatarFallback }