Skip to content

Commit 5443261

Browse files
committed
chore(repeater-native): rename to empty placeholder
1 parent b88d65e commit 5443261

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/pluggableWidgets/repeater-native/src/Repeater.editorConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export function getPreview(values: RepeaterPreviewProps, isDarkMode: boolean): S
3535
children: [
3636
{
3737
type: "DropZone",
38-
placeholder: "Content when Empty",
39-
property: values.contentEmpty
38+
placeholder: "No items placeholder: Place widgets here",
39+
property: values.emptyPlaceholder
4040
}
4141
]
4242
}

packages/pluggableWidgets/repeater-native/src/Repeater.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ export function Repeater(props: RepeaterProps<RepeaterStyle>): ReactElement {
1010
if (props.datasource.status === ValueStatus.Loading || !props.datasource.items) {
1111
return <View />;
1212
}
13-
const contentEmpty = props.datasource.items.length === 0 ? props.contentEmpty : null;
13+
const emptyPlaceholder = props.datasource.items.length === 0 ? props.emptyPlaceholder : null;
1414
return (
1515
<View style={styles.container}>
1616
{props.datasource.items.map((item, index) => (
1717
<Fragment key={`item_${index}`}>{props.content.get(item)}</Fragment>
1818
))}
19-
{contentEmpty}
19+
{emptyPlaceholder}
2020
</View>
2121
);
2222
}

packages/pluggableWidgets/repeater-native/src/Repeater.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<caption>Content</caption>
1616
<description/>
1717
</property>
18-
<property key="contentEmpty" type="widgets" required="false">
19-
<caption>Content empty</caption>
18+
<property key="emptyPlaceholder" type="widgets" required="false">
19+
<caption>Empty placeholder</caption>
2020
<description/>
2121
</property>
2222
</propertyGroup>

packages/pluggableWidgets/repeater-native/typings/RepeaterProps.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface RepeaterProps<Style> {
1111
style: Style[];
1212
datasource: ListValue;
1313
content: ListWidgetValue;
14-
contentEmpty?: ReactNode;
14+
emptyPlaceholder?: ReactNode;
1515
}
1616

1717
export interface RepeaterPreviewProps {
@@ -26,5 +26,5 @@ export interface RepeaterPreviewProps {
2626
renderMode?: "design" | "xray" | "structure";
2727
datasource: {} | { caption: string } | { type: string } | null;
2828
content: { widgetCount: number; renderer: ComponentType<{ children: ReactNode; caption?: string }> };
29-
contentEmpty: { widgetCount: number; renderer: ComponentType<{ caption?: string }> };
29+
emptyPlaceholder: { widgetCount: number; renderer: ComponentType<{ caption?: string }> };
3030
}

0 commit comments

Comments
 (0)