Skip to content

Commit f2cfe4a

Browse files
committed
refactor(infographic): items registration add values
1 parent 0726600 commit f2cfe4a

30 files changed

Lines changed: 155 additions & 34 deletions

packages/infographic/src/designs/items/BadgeCard.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,7 @@ export const BadgeCard: ComponentType<BadgeCardProps> = (props) => {
136136
);
137137
};
138138

139-
registerItem('badge-card', { component: BadgeCard });
139+
registerItem('badge-card', {
140+
component: BadgeCard,
141+
values: ['icon', 'label', 'value', 'desc'],
142+
});

packages/infographic/src/designs/items/BulletText.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,7 @@ export const BulletText: ComponentType<BulletTextProps> = (props) => {
7575
);
7676
};
7777

78-
registerItem('bullet-text', { component: BulletText });
78+
registerItem('bullet-text', {
79+
component: BulletText,
80+
values: ['label'],
81+
});

packages/infographic/src/designs/items/CandyCardLite.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,7 @@ export const CandyCardLite: ComponentType<CandyCardLiteProps> = (props) => {
8282
);
8383
};
8484

85-
registerItem('candy-card-lite', { component: CandyCardLite });
85+
registerItem('candy-card-lite', {
86+
component: CandyCardLite,
87+
values: ['icon', 'label', 'desc'],
88+
});

packages/infographic/src/designs/items/ChartColumn.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,7 @@ export const ChartColumn: ComponentType<ChartColumnProps> = (props) => {
125125
);
126126
};
127127

128-
registerItem('chart-column', { component: ChartColumn });
128+
registerItem('chart-column', {
129+
component: ChartColumn,
130+
values: ['label', 'value'],
131+
});

packages/infographic/src/designs/items/CircleNode.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ export const CircleNode: ComponentType<CircleNodeProps> = (props) => {
9393
);
9494
};
9595

96-
registerItem('circle-node', { component: CircleNode });
96+
registerItem('circle-node', {
97+
component: CircleNode,
98+
values: ['label'],
99+
});
97100

98101
function fadeWithWhite(
99102
color: tinycolor.Instance,

packages/infographic/src/designs/items/CircularProgress.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,7 @@ export const CircularProgress: ComponentType<CircularProgressProps> = (
100100
);
101101
};
102102

103-
registerItem('circular-progress', { component: CircularProgress });
103+
registerItem('circular-progress', {
104+
component: CircularProgress,
105+
values: ['label', 'value'],
106+
});

packages/infographic/src/designs/items/CompactCard.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,7 @@ export const CompactCard: ComponentType<CompactCardProps> = (props) => {
124124
);
125125
};
126126

127-
registerItem('compact-card', { component: CompactCard });
127+
registerItem('compact-card', {
128+
component: CompactCard,
129+
values: ['icon', 'label', 'value', 'desc'],
130+
});

packages/infographic/src/designs/items/DoneList.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,7 @@ export const DoneList: ComponentType<DoneListProps> = (props) => {
6363
);
6464
};
6565

66-
registerItem('done-list', { component: DoneList });
66+
registerItem('done-list', {
67+
component: DoneList,
68+
values: ['desc'],
69+
});

packages/infographic/src/designs/items/HorizontalIconArrow.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,7 @@ const DotLine = (props: {
218218
);
219219
};
220220

221-
registerItem('horizontal-icon-arrow', { component: HorizontalIconArrow });
221+
registerItem('horizontal-icon-arrow', {
222+
component: HorizontalIconArrow,
223+
values: ['icon', 'label', 'desc'],
224+
});

packages/infographic/src/designs/items/HorizontalIconLine.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,7 @@ export const HorizontalIconLine: ComponentType<HorizontalIconLineProps> = (
146146
);
147147
};
148148

149-
registerItem('horizontal-icon-line', { component: HorizontalIconLine });
149+
registerItem('horizontal-icon-line', {
150+
component: HorizontalIconLine,
151+
values: ['icon', 'label', 'desc'],
152+
});

0 commit comments

Comments
 (0)