From 5f507c26f30c064c8302a01f50855a91e3dcca50 Mon Sep 17 00:00:00 2001 From: namnguyen Date: Wed, 20 Nov 2024 21:30:08 +0700 Subject: [PATCH] updated per Fab --- doc/gui/extension/example_library/example_library.py | 6 +++--- .../front-end/src/{LabeledItem.tsx => VisualLabelList.tsx} | 6 +++--- doc/gui/extension/example_library/front-end/src/index.ts | 4 ++-- .../{labeled_item_list.py => visual_label_list.py} | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename doc/gui/extension/example_library/front-end/src/{LabeledItem.tsx => VisualLabelList.tsx} (87%) rename doc/gui/extension/{labeled_item_list.py => visual_label_list.py} (95%) diff --git a/doc/gui/extension/example_library/example_library.py b/doc/gui/extension/example_library/example_library.py index cef004fa0..acba0aeca 100644 --- a/doc/gui/extension/example_library/example_library.py +++ b/doc/gui/extension/example_library/example_library.py @@ -42,15 +42,15 @@ def __init__(self) -> None: # element, exported as GameTable in front-end/src/index.ts # react_component="GameTable", ), - "labeled_item_list": Element( + "visual_label_list": Element( "lov", { "lov": ElementProperty(PropertyType.lov), "sort": ElementProperty(PropertyType.string), }, - # The name of the React component (LabeledItem) that implements this custom + # The name of the React component (VisualLabelList) that implements this custom # element, exported as LabeledItemList in front-end/src/index.ts - react_component="LabeledItem", + react_component="VisualLabelList", ) } diff --git a/doc/gui/extension/example_library/front-end/src/LabeledItem.tsx b/doc/gui/extension/example_library/front-end/src/VisualLabelList.tsx similarity index 87% rename from doc/gui/extension/example_library/front-end/src/LabeledItem.tsx rename to doc/gui/extension/example_library/front-end/src/VisualLabelList.tsx index 1eedd7da4..793a6499a 100644 --- a/doc/gui/extension/example_library/front-end/src/LabeledItem.tsx +++ b/doc/gui/extension/example_library/front-end/src/VisualLabelList.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from "react"; import { LoV, useLovListMemo } from "taipy-gui"; -interface LabeledItemProps { +interface VisualLabelListProps { lov?: LoV; defaultLov?: string; sort?: "asc" | "desc"; @@ -19,7 +19,7 @@ const styles = { }, }; -const LabeledItem: React.FC = ({ lov, defaultLov = "", sort }) => { +const VisualLabelList: React.FC = ({ lov, defaultLov = "", sort }) => { const lovList = useLovListMemo(lov, defaultLov); const sortedLovList = useMemo(() => { @@ -47,4 +47,4 @@ const LabeledItem: React.FC = ({ lov, defaultLov = "", sort }) ); }; -export default LabeledItem; +export default VisualLabelList; diff --git a/doc/gui/extension/example_library/front-end/src/index.ts b/doc/gui/extension/example_library/front-end/src/index.ts index b2e245a27..c2de08c12 100644 --- a/doc/gui/extension/example_library/front-end/src/index.ts +++ b/doc/gui/extension/example_library/front-end/src/index.ts @@ -8,6 +8,6 @@ // the name used in the element declaration in the element library. import ColoredLabel from "./ColoredLabel"; import GameTable from "./GameTable"; -import LabeledItem from "./LabeledItem"; +import VisualLabelList from "./VisualLabelList"; -export { ColoredLabel as ExampleLabel, GameTable, LabeledItem }; +export { ColoredLabel as ExampleLabel, GameTable, VisualLabelList }; diff --git a/doc/gui/extension/labeled_item_list.py b/doc/gui/extension/visual_label_list.py similarity index 95% rename from doc/gui/extension/labeled_item_list.py rename to doc/gui/extension/visual_label_list.py index 0a2415664..73cc5efa5 100644 --- a/doc/gui/extension/labeled_item_list.py +++ b/doc/gui/extension/visual_label_list.py @@ -21,7 +21,7 @@ ] page = """ -<|{languages}|example.labeled_item_list|sort=asc|> +<|{languages}|example.visual_label_list|sort=asc|> """ if __name__ == "__main__":