@@ -33,14 +33,14 @@ class ExampleLibrary(ElementLibrary):
# element, exported as ExampleLabel in front-end/src/index.ts
react_component="ExampleLabel",
),
- "basic_table": Element(
+ "game_table": Element(
"data",
{
"data": ElementProperty(PropertyType.data),
},
- # The name of the React component (BasicTable) that implements this custom
+ # The name of the React component (GameTable) that implements this custom
# element, exported as BasicTable in front-end/src/index.ts
- react_component="BasicTable",
+ react_component="GameTable",
}
@@ -10,13 +10,13 @@ import {
RowValue,
} from "taipy-gui";
-interface BasicTableProps extends TaipyDynamicProps {
+interface GameTableProps extends TaipyDynamicProps {
data: TableValueType;
const pageKey = "no-page-key";
-const BasicTable = (props: BasicTableProps) => {
+const GameTable = (props: GameTableProps) => {
const { data, updateVarName = "", updateVars = "", id } = props;
const [value, setValue] = useState<TableValueType>({});
const dispatch = useDispatch();
@@ -84,4 +84,4 @@ const BasicTable = (props: BasicTableProps) => {
);
};
-export default BasicTable;
+export default GameTable;
@@ -7,6 +7,6 @@
// Note that we export the 'ColoredLabel' component as 'ExampleLabel', which is
// the name used in the element declaration in the element library.
import ColoredLabel from "./ColoredLabel";
-import BasicTable from "./BasicTable";
+import GameTable from "./BasicTable";
-export { ColoredLabel as ExampleLabel, BasicTable };
+export { ColoredLabel as ExampleLabel, GameTable };
@@ -30,7 +30,7 @@ data = pd.DataFrame(chessboard, columns=["A", "B", "C", "D", "E", "F", "G", "H"]
page = """
## Chess Game
-<|{data}|example.basic_table|>
+<|{data}|example.game_table|>
"""
if __name__ == "__main__":