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:
@@ -1,4 +1,4 @@
|
||||
import { Typography } from "@/components/elements"
|
||||
import { Typography } from "@/components/elements/Typography"
|
||||
|
||||
const Home: React.FC = () => {
|
||||
return (
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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"
|
||||
@@ -7,6 +7,8 @@ export type FieldType =
|
||||
| "object"
|
||||
| "boolean"
|
||||
| "select"
|
||||
| "image"
|
||||
| "number"
|
||||
|
||||
export interface FieldOption {
|
||||
label: string
|
||||
|
||||
Reference in New Issue
Block a user