From 19974daa67b034062e991cff6611477741c0a09d Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Thu, 30 Oct 2025 10:16:45 -0500 Subject: wip: desktop work --- packages/ui/src/components/card.css | 29 +++++++++++++++++++++++++++++ packages/ui/src/components/card.tsx | 22 ++++++++++++++++++++++ packages/ui/src/components/icon.tsx | 1 + packages/ui/src/components/index.ts | 1 + packages/ui/src/styles/index.css | 1 + 5 files changed, 54 insertions(+) create mode 100644 packages/ui/src/components/card.css create mode 100644 packages/ui/src/components/card.tsx (limited to 'packages/ui/src') diff --git a/packages/ui/src/components/card.css b/packages/ui/src/components/card.css new file mode 100644 index 000000000..a9b7c8784 --- /dev/null +++ b/packages/ui/src/components/card.css @@ -0,0 +1,29 @@ +[data-component="card"] { + width: 100%; + display: flex; + flex-direction: column; + background-color: var(--surface-inset-base); + border: 1px solid var(--border-weaker-base); + transition: background-color 0.15s ease; + border-radius: 8px; + padding: 6px 12px; + overflow: clip; + + &[data-variant="error"] { + background-color: var(--surface-critical-weak); + border: 1px solid var(--border-critical-base); + color: rgba(218, 51, 25, 0.6); + + /* text-12-regular */ + font-family: var(--font-family-sans); + font-size: var(--font-size-small); + font-style: normal; + font-weight: var(--font-weight-regular); + line-height: var(--line-height-large); /* 166.667% */ + letter-spacing: var(--letter-spacing-normal); + + &[data-component="icon"] { + color: var(--icon-critical-active); + } + } +} diff --git a/packages/ui/src/components/card.tsx b/packages/ui/src/components/card.tsx new file mode 100644 index 000000000..3fb225ab2 --- /dev/null +++ b/packages/ui/src/components/card.tsx @@ -0,0 +1,22 @@ +import { type ComponentProps, splitProps } from "solid-js" + +export interface CardProps extends ComponentProps<"div"> { + variant?: "normal" | "error" | "warning" | "success" | "info" +} + +export function Card(props: CardProps) { + const [split, rest] = splitProps(props, ["variant", "class", "classList"]) + return ( +