From 791a257294c068e9b1344ca9f6ccadb6e1260932 Mon Sep 17 00:00:00 2001 From: Rami Bitar Date: Tue, 9 Jun 2026 15:59:47 -0400 Subject: [PATCH] Remove elements barrel file and next/image, add image/number field types Co-Authored-By: Claude Opus 4.8 (1M context) --- app/page.tsx | 2 +- components/elements/Image.config.tsx | 6 +++--- components/elements/Image.tsx | 3 +-- components/elements/index.ts | 26 -------------------------- components/elements/types.ts | 2 ++ 5 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 components/elements/index.ts diff --git a/app/page.tsx b/app/page.tsx index da2f0ca..0cd3a95 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,4 +1,4 @@ -import { Typography } from "@/components/elements" +import { Typography } from "@/components/elements/Typography" const Home: React.FC = () => { return ( diff --git a/components/elements/Image.config.tsx b/components/elements/Image.config.tsx index f362ccf..e5796ad 100644 --- a/components/elements/Image.config.tsx +++ b/components/elements/Image.config.tsx @@ -5,7 +5,7 @@ export const ImageConfig: ElementConfig = { label: "Image", fields: { src: { - type: "text", + type: "image", label: "Source URL", }, alt: { @@ -28,11 +28,11 @@ export const ImageConfig: ElementConfig = { label: "Circle", }, width: { - type: "text", + type: "number", label: "Width", }, height: { - type: "text", + type: "number", label: "Height", }, }, diff --git a/components/elements/Image.tsx b/components/elements/Image.tsx index 1a24cc6..e4307a8 100644 --- a/components/elements/Image.tsx +++ b/components/elements/Image.tsx @@ -1,5 +1,4 @@ import * as React from "react" -import NextImage from "next/image" import { cn } from "@/lib/utils" @@ -38,7 +37,7 @@ function Image({ className, }: ImageProps) { return ( -