Remove elements barrel file and next/image, add image/number field types

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rami Bitar
2026-06-09 15:59:47 -04:00
parent 3ed7e027c2
commit 791a257294
5 changed files with 7 additions and 32 deletions

View File

@@ -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",
},
},

View File

@@ -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 (
<NextImage
<img
data-slot="image"
src={src}
alt={alt}

View File

@@ -1,26 +0,0 @@
export * from "./types"
export { Typography } from "./Typography"
export type {
TypographyProps,
TypographyVariant,
TypographyAlign,
TypographyWeight,
} from "./Typography"
export { TypographyConfig } from "./Typography.config"
export { Button } from "./Button"
export type { ButtonProps, ButtonVariant, ButtonSize } from "./Button"
export { ButtonConfig } from "./Button.config"
export { Image } from "./Image"
export type { ImageProps, ObjectFit } from "./Image"
export { ImageConfig } from "./Image.config"
export { Icon } from "./Icon"
export type { IconProps, IconName } from "./Icon"
export { IconConfig } from "./Icon.config"
export { Card } from "./Card"
export type { CardProps, CardTag } from "./Card"
export { CardConfig } from "./Card.config"

View File

@@ -7,6 +7,8 @@ export type FieldType =
| "object"
| "boolean"
| "select"
| "image"
| "number"
export interface FieldOption {
label: string