Grid to App
A product grid expands into a store admin app with sidebar and product catalogue.
Source
components/kuchi/grid-to-app.tsx
1"use client";23import { loadFont as loadMono } from "@remotion/google-fonts/DMMono";4import { loadFont as loadInterTight } from "@remotion/google-fonts/InterTight";5import type React from "react";6import {7 AbsoluteFill,8 Easing,9 Img,10 interpolate,11 spring,12 useCurrentFrame,13 useVideoConfig,14} from "remotion";15import type { GradientParams } from "@/lib/kuchi/gsh/gradient-engine";16import { GshGround } from "@/lib/kuchi/gsh/gsh-ground";17import type { GshPresetId } from "@/lib/kuchi/gsh/presets";1819const inter = loadInterTight("normal", {20 weights: ["300", "400"],21 subsets: ["latin"],22});23const mono = loadMono("normal", { weights: ["400"], subsets: ["latin"] });2425const ENTER = Easing.bezier(0.32, 0.72, 0, 1);26const CAM = Easing.bezier(0.87, 0, 0.13, 1);27const MOVE = Easing.bezier(0.65, 0, 0.35, 1);28const HEAVY = { mass: 1, damping: 26, stiffness: 120 };29const CARD = { mass: 0.8, damping: 18, stiffness: 160 };30const CHIP = { mass: 0.5, damping: 12, stiffness: 200 };3132const B = {33 row1: [-8, -5, -2, 1],34 pull: 14,35 pullLen: 40,36 chrome: 24,37 side: 28,38 row2: [50, 53, 56, 59],39 count: 50,40 publish: 84,41 end: 132,42};4344const ramp = (f: number, start: number, dur: number, easing = ENTER) =>45 interpolate(f, [start, start + dur], [0, 1], {46 extrapolateLeft: "clamp",47 extrapolateRight: "clamp",48 easing,49 });5051const mix = (a: number, b: number, t: number) => a + (b - a) * t;5253const dip = (f: number, at: number, depth: number) =>54 1 - depth * ramp(f, at, 3, MOVE) + depth * ramp(f, at + 3, 9, ENTER);5556const line = (color: string, w = 1.5) => ({57 fill: "none",58 stroke: color,59 strokeWidth: w,60 strokeLinecap: "round" as const,61 strokeLinejoin: "round" as const,62});6364const ICONS: Record<string, string> = {65 home: "M4 10.5 12 4l8 6.5V20h-5.5v-5.5h-5V20H4z",66 orders: "M6 4h12l1 16H5L6 4ZM9 8a3 3 0 0 0 6 0",67 products: "M12 3.5 20 8v8l-8 4.5L4 16V8l8-4.5ZM4 8l8 4.5L20 8M12 12.5V20.5",68 customers:69 "M9 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM3 20c0-3.3 2.7-6 6-6s6 2.7 6 6M16 4.5a3.5 3.5 0 0 1 0 6.5M18 14c2 .8 3 2.8 3 6",70 analytics: "M4 20V10M10 20V4M16 20v-7M21 20H3",71 store: "M4 9.5 5.5 4h13L20 9.5M4 9.5h16M4 9.5V20h16V9.5M9.5 20v-5h5v5",72 pos: "M5 4h14v16H5zM8 8h8M8 12h2M12 12h2M8 16h2M12 16h2",73 search: "M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14ZM20 20l-4-4",74 bell: "M6 16V11a6 6 0 0 1 12 0v5l1.5 2h-15L6 16ZM10 20.5h4",75};7677function Icon({78 d,79 color,80 size = 18,81}: {82 d: string;83 color: string;84 size?: number;85}) {86 return (87 <svg viewBox="0 0 24 24" width={size} height={size} aria-hidden>88 <path d={d} {...line(color)} />89 </svg>90 );91}9293export interface GridToAppProps {94 theme?: "dark" | "light";95 accent?: string;96 storeName?: string;97 pageTitle?: string;98 images?: string[];99 products?: { name: string; price: string }[];100 /** Label of the top-bar button before the store goes live. */101 publishLabel?: string;102 /** Label of the same button once the store is live. */103 liveLabel?: string;104 /** Label of the primary button next to the page title. */105 addLabel?: string;106 /** Text color; overrides the theme ink. */107 ink?: string;108 /** Solid fill in place of the gradient ground; "transparent" drops it. */109 background?: string;110 /** Typeface for the copy. Load it yourself; Inter Tight by default. */111 fontFamily?: string;112 /** Size of the window, around the frame's center. */113 scale?: number;114 /** Frames to hold the first frame before anything moves. */115 delay?: number;116 speed?: number;117 ground?: GshPresetId;118 groundParams?: Partial<GradientParams>;119}120121/** The foreground at `scale`, around the frame's center; nothing extra at 1. */122function ScaleLayer({123 scale,124 children,125}: {126 scale: number;127 children: React.ReactNode;128}) {129 if (scale === 1) return children;130 return (131 <AbsoluteFill style={{ transform: `scale(${scale})` }}>132 {children}133 </AbsoluteFill>134 );135}136137export function GridToApp({138 theme = "dark",139 accent = "#ff6a2b",140 storeName = "Studio Goods",141 pageTitle = "Products",142 images = [143 "https://kuchi-media.kalarislabs.com/components/art/art-03.svg",144 "https://kuchi-media.kalarislabs.com/components/art/art-04.svg",145 "https://kuchi-media.kalarislabs.com/components/art/art-05.svg",146 "https://kuchi-media.kalarislabs.com/components/art/art-06.svg",147 "https://kuchi-media.kalarislabs.com/components/art/art-07.svg",148 "https://kuchi-media.kalarislabs.com/components/art/art-08.svg",149 "https://kuchi-media.kalarislabs.com/components/art/art-09.svg",150 "https://kuchi-media.kalarislabs.com/components/art/art-10.svg",151 ],152 products = [153 { name: "Ceramic pitcher", price: "$48.00" },154 { name: "Oak stool", price: "$120.00" },155 { name: "Arch sculpture", price: "$86.00" },156 { name: "Material kit", price: "$32.00" },157 { name: "Writing desk", price: "$640.00" },158 { name: "Oak dining table", price: "$1,180.00" },159 { name: "Travertine bench", price: "$420.00" },160 { name: "Olive planter", price: "$64.00" },161 ],162 publishLabel = "Publish",163 liveLabel = "Store live",164 addLabel = "Add product",165 ink: inkProp,166 background,167 fontFamily = inter.fontFamily,168 scale = 1,169 delay = 0,170 speed = 1,171 ground,172 groundParams,173}: GridToAppProps) {174 const frame = Math.max(0, useCurrentFrame() - delay) * speed;175 const { width, height, fps } = useVideoConfig();176 const dark = theme === "dark";177 const portrait = height > width * 1.2;178 const stageW = portrait ? 720 : 1280;179 const stageH = portrait ? 1280 : 720;180 const k = width / stageW;181182 const ink = inkProp ?? (dark ? "#f6efe9" : "#1b1714");183 const muted = dark ? "rgba(246,239,233,0.54)" : "rgba(27,23,20,0.52)";184 const faint = dark ? "rgba(246,239,233,0.3)" : "rgba(27,23,20,0.3)";185 const hair = dark ? "rgba(255,236,222,0.09)" : "rgba(60,36,20,0.09)";186 const fill = dark ? "rgba(255,236,222,0.05)" : "rgba(60,36,20,0.045)";187 const winBg = dark ? "#141010" : "#ffffff";188 const sideBg = dark ? "#100d0c" : "#f8f5f2";189 const mainBg = dark ? "#171312" : "#fcfbf9";190 const cardBg = dark ? "#1f1a18" : "#ffffff";191 const shadow = dark192 ? "inset 0 1px 0 rgba(255,240,225,0.06), 0 1px 2px rgba(0,0,0,0.4), 0 20px 44px rgba(0,0,0,0.4), 0 70px 140px rgba(20,6,0,0.6)"193 : "inset 0 1px 0 #ffffff, 0 1px 2px rgba(120,60,20,0.06), 0 18px 40px rgba(150,80,30,0.1), 0 60px 130px rgba(150,80,30,0.18)";194195 const winW = portrait ? 680 : 1180;196 const winH = portrait ? 1180 : 660;197 const topH = 54;198 const sideW = portrait ? 66 : 232;199 const mainW = winW - sideW;200 const pad = portrait ? 22 : 30;201 const cols = portrait ? 2 : 4;202 const gap = portrait ? 16 : 18;203 const cardW = (mainW - pad * 2 - gap * (cols - 1)) / cols;204 const imgH = cardW;205 const cardH = imgH + 72;206 const headTop = topH + (portrait ? 22 : 26);207 const tabsTop = headTop + 58;208 const gridTop = tabsTop + 56;209 const cardPos = (i: number) => ({210 x: sideW + pad + (i % cols) * (cardW + gap),211 y: gridTop + Math.floor(i / cols) * (cardH + gap),212 });213214 const pull = ramp(frame, B.pull, B.pullLen, CAM);215 const pullPrev = ramp(frame - 1, B.pull, B.pullLen, CAM);216 const tilt = spring({217 frame: frame - B.pull,218 fps,219 config: HEAVY,220 durationInFrames: B.pullLen + 10,221 });222 const focusX = sideW + pad + (mainW - pad * 2) / 2 - winW / 2;223 const focusY = gridTop + cardH / 2 - winH / 2 + (portrait ? cardH / 2 : 0);224 const z0 = portrait ? 1.2 : 1.42;225 const z =226 mix(z0, 1, pull) *227 (1 + 0.03 * ramp(frame, B.pull + B.pullLen, B.end, Easing.linear)) +228 0.025 * ramp(frame, -10, B.pull + 6, Easing.linear) * (1 - pull);229 const fx = mix(focusX, 0, pull);230 const fy = mix(focusY, portrait ? 10 : 6, pull);231 const rotX = mix(0, 7, tilt) + 6 * Math.sin(Math.PI * pull);232 const rotY = mix(0, portrait ? -6 : -10, tilt) + Math.sin(frame / 50) * 0.6;233 const rotZ = mix(0, portrait ? 0.6 : 1.2, tilt);234 const pullV = Math.abs(pull - pullPrev);235 const camBlur = Math.min(4, pullV * 60);236237 const chrome = ramp(frame, B.chrome, 18);238 const sideItem = (i: number) => ramp(frame, B.side + i * 2, 12);239 const countRoll = ramp(frame, B.count, 12, MOVE);240 const countVal = Math.round(mix(4, products.length, countRoll));241 const pub = spring({ frame: frame - B.publish, fps, config: CHIP });242 const live = frame >= B.publish;243 const pubDip = dip(frame, B.publish - 4, 0.08);244245 const resolvedPreset: GshPresetId | undefined = ground;246 const resolvedParams: Partial<GradientParams> | undefined =247 groundParams ??248 (ground249 ? undefined250 : dark251 ? {252 kind: "mist",253 background: "#0b0705",254 colors: ["#ffb37a", "#ff6a2c", "#5a1d0c", "#1a0a05"],255 seed: 11,256 }257 : {258 kind: "mist",259 background: "#fbf6f0",260 colors: ["#ffa266", "#ffd6b6", "#fff3e8", "#e8763a"],261 seed: 11,262 });263264 const navItems = [265 { id: "home", label: "Home" },266 { id: "orders", label: "Orders", badge: "4" },267 { id: "products", label: "Products", active: true },268 { id: "customers", label: "Customers" },269 { id: "analytics", label: "Analytics" },270 ];271 const channelItems = [272 { id: "store", label: "Online store" },273 { id: "pos", label: "Point of sale" },274 ];275276 const chromeStyle = (i: number): React.CSSProperties => {277 const t = sideItem(i);278 return {279 opacity: t * chrome,280 transform: `translateX(${mix(-14, 0, t)}px)`,281 };282 };283284 const navRow = (285 it: { id: string; label: string; badge?: string; active?: boolean },286 i: number,287 ) => (288 <div289 key={it.id}290 style={{291 height: 40,292 borderRadius: 10,293 display: "flex",294 alignItems: "center",295 justifyContent: portrait ? "center" : undefined,296 gap: 12,297 padding: portrait ? 0 : "0 12px",298 background: it.active ? fill : "transparent",299 boxShadow: it.active300 ? dark301 ? "inset 0 1px 0 rgba(255,240,225,0.05)"302 : "0 1px 2px rgba(60,36,20,0.06)"303 : undefined,304 border: it.active ? `1px solid ${hair}` : "1px solid transparent",305 color: it.active ? ink : muted,306 fontSize: 16,307 ...chromeStyle(i),308 }}309 >310 <Icon d={ICONS[it.id]} color={it.active ? ink : muted} />311 {portrait ? null : <span style={{ flex: 1 }}>{it.label}</span>}312 {it.badge && !portrait ? (313 <span314 style={{315 minWidth: 22,316 height: 22,317 borderRadius: 7,318 background: fill,319 fontSize: 13,320 display: "flex",321 alignItems: "center",322 justifyContent: "center",323 fontFamily: mono.fontFamily,324 }}325 >326 {it.badge}327 </span>328 ) : null}329 </div>330 );331332 return (333 <AbsoluteFill style={{ fontFamily, overflow: "hidden" }}>334 {background === undefined ? (335 <GshGround336 preset={resolvedPreset}337 params={resolvedParams}338 timeOffset={4}339 timeScale={0.45}340 />341 ) : (342 <AbsoluteFill343 style={{344 background: background === "transparent" ? undefined : background,345 }}346 />347 )}348 <svg width={0} height={0} style={{ position: "absolute" }} aria-hidden>349 <filter id="gta-cam" x="-5%" y="-5%" width="110%" height="110%">350 <feGaussianBlur stdDeviation={`${camBlur * 0.6} ${camBlur}`} />351 </filter>352 </svg>353 <ScaleLayer scale={scale}>354 <div355 style={{356 position: "absolute",357 left: 0,358 top: 0,359 width: stageW,360 height: stageH,361 transform: `scale(${k})`,362 transformOrigin: "0 0",363 perspective: 2200,364 }}365 >366 <div367 style={{368 position: "absolute",369 left: stageW / 2,370 top: stageH / 2,371 width: 0,372 height: 0,373 transformStyle: "preserve-3d",374 transform: `translate(${-fx * z}px, ${-fy * z}px) rotateX(${rotX}deg) rotateY(${rotY}deg) rotateZ(${rotZ}deg) scale(${z})`,375 }}376 >377 <div378 style={{379 position: "absolute",380 left: -winW / 2,381 top: -winH / 2,382 width: winW,383 height: winH,384 borderRadius: 20,385 background: winBg,386 border: `1px solid ${hair}`,387 boxShadow: shadow,388 opacity: chrome,389 }}390 />391 <div392 style={{393 position: "absolute",394 left: -winW / 2,395 top: -winH / 2,396 width: winW,397 height: winH,398 borderRadius: 20,399 overflow: "hidden",400 filter: camBlur > 0.4 ? "url(#gta-cam)" : undefined,401 }}402 >403 <div404 style={{405 position: "absolute",406 left: sideW,407 top: topH,408 right: 0,409 bottom: 0,410 background: mainBg,411 opacity: chrome,412 }}413 />414 <div415 style={{416 position: "absolute",417 left: 0,418 top: topH,419 width: sideW,420 bottom: 0,421 background: sideBg,422 borderRight: `1px solid ${hair}`,423 opacity: chrome,424 padding: portrait ? "18px 12px" : "18px 14px",425 boxSizing: "border-box",426 display: "flex",427 flexDirection: "column",428 gap: 4,429 }}430 >431 {navItems.map((it, i) => navRow(it, i))}432 {portrait ? (433 <div434 style={{ height: 1, background: hair, margin: "12px 6px" }}435 />436 ) : (437 <div438 style={{439 fontSize: 13,440 color: faint,441 letterSpacing: "0.04em",442 padding: "20px 12px 8px",443 ...chromeStyle(5),444 }}445 >446 Sales channels447 </div>448 )}449 {channelItems.map((it, i) => navRow(it, i + 6))}450 <div style={{ flex: 1 }} />451 {portrait ? null : (452 <div453 style={{454 borderRadius: 14,455 border: `1px solid ${hair}`,456 background: fill,457 padding: 14,458 ...chromeStyle(8),459 }}460 >461 <div style={{ fontSize: 15, color: ink }}>Setup guide</div>462 <div style={{ fontSize: 13, color: muted, marginTop: 4 }}>463 4 of 6 tasks done464 </div>465 <div466 style={{467 height: 5,468 borderRadius: 3,469 background: fill,470 marginTop: 10,471 overflow: "hidden",472 }}473 >474 <div475 style={{476 width: `${mix(50, 67, ramp(frame, B.count, 18))}%`,477 height: "100%",478 borderRadius: 3,479 background: accent,480 }}481 />482 </div>483 </div>484 )}485 </div>486487 <div488 style={{489 position: "absolute",490 left: 0,491 right: 0,492 top: 0,493 height: topH,494 borderBottom: `1px solid ${hair}`,495 display: "flex",496 alignItems: "center",497 padding: "0 16px",498 gap: 14,499 opacity: chrome,500 transform: `translateY(${mix(-12, 0, chrome)}px)`,501 }}502 >503 <div style={{ display: "flex", gap: 8 }}>504 {[0, 1, 2].map((i) => (505 <span506 key={i}507 style={{508 width: 12,509 height: 12,510 borderRadius: 6,511 background: fill,512 border: `1px solid ${hair}`,513 }}514 />515 ))}516 </div>517 <div518 style={{519 display: "flex",520 alignItems: "center",521 gap: 10,522 marginLeft: 8,523 fontSize: 16,524 color: ink,525 }}526 >527 <span528 style={{529 width: 26,530 height: 26,531 borderRadius: 7,532 background: accent,533 color: "#fff",534 fontSize: 14,535 display: "flex",536 alignItems: "center",537 justifyContent: "center",538 boxShadow: "inset 0 1px 0 rgba(255,255,255,0.3)",539 }}540 >541 {storeName.slice(0, 1)}542 </span>543 {portrait ? null : storeName}544 {portrait ? null : (545 <svg viewBox="0 0 24 24" width={14} height={14} aria-hidden>546 <path d="m7 10 5 5 5-5" {...line(muted)} />547 </svg>548 )}549 </div>550 <div551 style={{ flex: 1, display: "flex", justifyContent: "center" }}552 >553 {portrait ? null : (554 <div555 style={{556 width: 360,557 height: 34,558 borderRadius: 10,559 background: fill,560 border: `1px solid ${hair}`,561 display: "flex",562 alignItems: "center",563 gap: 10,564 padding: "0 12px",565 fontSize: 15,566 color: faint,567 }}568 >569 <Icon d={ICONS.search} color={muted} size={16} />570 <span style={{ flex: 1 }}>Search products</span>571 <span572 style={{ fontFamily: mono.fontFamily, fontSize: 13 }}573 >574 ⌘K575 </span>576 </div>577 )}578 </div>579 <Icon d={ICONS.bell} color={muted} />580 <div581 style={{582 height: 34,583 padding: "0 14px",584 borderRadius: 10,585 display: "flex",586 alignItems: "center",587 gap: 8,588 fontSize: 15,589 color: live ? "#fff" : ink,590 background: live ? accent : fill,591 border: live ? "none" : `1px solid ${hair}`,592 transform: `scale(${live ? mix(0.82, 1, pub) : pubDip})`,593 boxShadow: live594 ? `inset 0 1px 0 rgba(255,255,255,0.3), 0 8px 22px color-mix(in oklab, ${accent} 45%, transparent)`595 : undefined,596 }}597 >598 {live ? (599 <span600 style={{601 width: 7,602 height: 7,603 borderRadius: 4,604 background: "#fff",605 }}606 />607 ) : null}608 {live ? liveLabel : publishLabel}609 </div>610 <span611 style={{612 width: 32,613 height: 32,614 borderRadius: 16,615 background: dark ? "#3a2b24" : "#f1e2d6",616 color: ink,617 fontSize: 13,618 display: "flex",619 alignItems: "center",620 justifyContent: "center",621 }}622 >623 AS624 </span>625 </div>626627 <div628 style={{629 position: "absolute",630 left: sideW + pad,631 right: pad,632 top: headTop,633 height: 46,634 display: "flex",635 alignItems: "center",636 gap: 12,637 opacity: chrome,638 transform: `translateY(${mix(14, 0, chrome)}px)`,639 }}640 >641 <span642 style={{643 fontSize: portrait ? 32 : 36,644 fontWeight: 300,645 color: ink,646 letterSpacing: "-0.04em",647 }}648 >649 {pageTitle}650 </span>651 <span652 style={{653 height: 26,654 minWidth: 26,655 padding: "0 8px",656 borderRadius: 8,657 background: fill,658 border: `1px solid ${hair}`,659 fontFamily: mono.fontFamily,660 fontSize: 14,661 color: muted,662 display: "flex",663 alignItems: "center",664 justifyContent: "center",665 overflow: "hidden",666 }}667 >668 {countVal}669 </span>670 <span style={{ flex: 1 }} />671 {portrait ? null : (672 <span673 style={{674 height: 38,675 padding: "0 16px",676 borderRadius: 11,677 border: `1px solid ${hair}`,678 fontSize: 15,679 color: ink,680 display: "flex",681 alignItems: "center",682 }}683 >684 Import685 </span>686 )}687 <span688 style={{689 height: 38,690 padding: "0 16px",691 borderRadius: 11,692 background: ink,693 color: winBg,694 fontSize: 15,695 display: "flex",696 alignItems: "center",697 gap: 8,698 }}699 >700 <svg viewBox="0 0 24 24" width={14} height={14} aria-hidden>701 <path d="M12 5v14M5 12h14" {...line(winBg, 2)} />702 </svg>703 {addLabel}704 </span>705 </div>706707 <div708 style={{709 position: "absolute",710 left: sideW + pad,711 right: pad,712 top: tabsTop,713 height: 40,714 display: "flex",715 alignItems: "flex-end",716 gap: 26,717 borderBottom: `1px solid ${hair}`,718 opacity: chrome,719 }}720 >721 {["All", "Active", "Drafts", "Archived"].map((t, i) => (722 <span723 key={t}724 style={{725 fontSize: 16,726 color: i === 0 ? ink : muted,727 paddingBottom: 11,728 borderBottom:729 i === 0730 ? `1.5px solid ${ink}`731 : "1.5px solid transparent",732 marginBottom: -1,733 }}734 >735 {t}736 </span>737 ))}738 </div>739740 {products.slice(0, cols * (portrait ? 3 : 2)).map((p, i) => {741 const pos = cardPos(i);742 const firstRow = i < 4;743 const at = firstRow744 ? (B.row1[i] ?? 0)745 : (B.row2[(i - 4) % B.row2.length] ?? 50) +746 Math.floor((i - 4) / B.row2.length) * 6;747 const pop = spring({ frame: frame - at, fps, config: CARD });748 const shown = frame >= at;749 return (750 <div751 key={p.name}752 style={{753 position: "absolute",754 left: pos.x,755 top: pos.y,756 width: cardW,757 height: cardH,758 borderRadius: 16,759 background: cardBg,760 border: `1px solid ${hair}`,761 boxShadow: dark762 ? "inset 0 1px 0 rgba(255,240,225,0.05), 0 10px 26px rgba(0,0,0,0.35)"763 : "0 1px 2px rgba(60,36,20,0.05), 0 10px 24px rgba(120,60,20,0.07)",764 overflow: "hidden",765 opacity: shown ? Math.min(1, pop * 1.8) : 0,766 transform: `translateY(${mix(firstRow ? 60 : 40, 0, pop)}px) scale(${mix(0.86, 1, pop)})`,767 }}768 >769 <div770 style={{771 position: "absolute",772 left: 8,773 top: 8,774 width: cardW - 16,775 height: imgH - 16,776 borderRadius: 10,777 overflow: "hidden",778 }}779 >780 <Img781 src={images[i % images.length]}782 style={{783 width: "100%",784 height: "100%",785 objectFit: "cover",786 transform: `scale(${1.06 - 0.06 * ramp(frame, at, 60, Easing.linear)})`,787 }}788 />789 {i === 1 ? (790 <span791 style={{792 position: "absolute",793 left: 8,794 top: 8,795 height: 24,796 padding: "0 9px",797 borderRadius: 7,798 background: "rgba(255,255,255,0.88)",799 color: "#1b1714",800 fontSize: 13,801 display: "flex",802 alignItems: "center",803 }}804 >805 New806 </span>807 ) : null}808 </div>809 <div810 style={{811 position: "absolute",812 left: 14,813 right: 14,814 top: imgH + 2,815 }}816 >817 <div818 style={{819 fontSize: 17,820 color: ink,821 whiteSpace: "nowrap",822 overflow: "hidden",823 textOverflow: "ellipsis",824 letterSpacing: "-0.01em",825 }}826 >827 {p.name}828 </div>829 <div830 style={{831 display: "flex",832 alignItems: "center",833 justifyContent: "space-between",834 marginTop: 6,835 }}836 >837 <span838 style={{839 fontFamily: mono.fontFamily,840 fontSize: 15,841 color: muted,842 }}843 >844 {p.price}845 </span>846 <span847 style={{848 display: "flex",849 alignItems: "center",850 gap: 6,851 fontSize: 14,852 color: muted,853 }}854 >855 <span856 style={{857 width: 7,858 height: 7,859 borderRadius: 4,860 background: i % 5 === 3 ? faint : "#3fb37f",861 }}862 />863 {i % 5 === 3 ? "Draft" : "Active"}864 </span>865 </div>866 </div>867 </div>868 );869 })}870 </div>871 </div>872 </div>873 </ScaleLayer>874 </AbsoluteFill>875 );876}877878export default GridToApp;









