Skip to content

Commit e2d75f4

Browse files
committed
Refactor component registration: Remove redundant 'type' property and update input types for consistency
1 parent 5a6655d commit e2d75f4

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

packages/components/src/renderers/basic/icon.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ ComponentRegistry.register('icon',
99
},
1010
{
1111
label: 'Icon',
12-
type: 'basic',
1312
inputs: [
1413
{ name: 'name', type: 'string', label: 'Icon Name' },
1514
{ name: 'className', type: 'string', label: 'CSS Class' }

packages/components/src/renderers/basic/image.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ ComponentRegistry.register('image',
1111
),
1212
{
1313
label: 'Image',
14-
type: 'basic',
1514
inputs: [
1615
{ name: 'src', type: 'string', label: 'Source URL' },
1716
{ name: 'alt', type: 'string', label: 'Alt Text' },

packages/components/src/renderers/data-display/chart.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,12 @@ ComponentRegistry.register('chart',
6262
},
6363
{
6464
label: 'Chart',
65-
type: 'data-display',
6665
inputs: [
6766
{
6867
name: 'chartType',
69-
type: 'select',
68+
type: 'enum',
7069
label: 'Chart Type',
71-
options: [
70+
enum: [
7271
{ label: 'Bar', value: 'bar' },
7372
{ label: 'Line', value: 'line' },
7473
{ label: 'Area', value: 'area' }

packages/core/src/registry/Registry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type ComponentInput = {
1111
enum?: string[] | { label: string; value: any }[];
1212
description?: string;
1313
advanced?: boolean;
14+
inputType?: string;
1415
};
1516

1617
export type ComponentMeta = {

0 commit comments

Comments
 (0)