From 7c9f2c803180c314bfa8436a86f0b179a4f0edbe Mon Sep 17 00:00:00 2001 From: nmsimons Date: Tue, 5 Dec 2023 12:20:23 -0800 Subject: [PATCH] Code cleanup --- src/react_app.tsx | 70 +++++++++++++++++++++++------------------------ src/schema.ts | 2 +- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/react_app.tsx b/src/react_app.tsx index cd7b1d4..8afbd89 100644 --- a/src/react_app.tsx +++ b/src/react_app.tsx @@ -27,6 +27,27 @@ export function ReactApp(props: { data: TreeView }): JSX.Element { ); } +export function ListGroup(props: { + target: StringList; + destination: StringList; +}): JSX.Element { + return ( +
+
+ +
+
+ + + +
+
+ ); +} + export function ItemCount(props: { target: StringList; }): JSX.Element { @@ -74,6 +95,20 @@ export function MoveButton(props: { return ; } +export function Button(props: { + children: ReactNode; + handleClick: () => void; +}): JSX.Element { + return ( + + ); +} + export function Explanation(): JSX.Element { return (
@@ -127,38 +162,3 @@ export function DemoLink(props: { href: string; children: ReactNode }): JSX.Elem
); } - -export function ListGroup(props: { - target: StringList; - destination: StringList; -}): JSX.Element { - return ( -
-
- -
-
- - - -
-
- ); -} - -export function Button(props: { - children: ReactNode; - handleClick: () => void; -}): JSX.Element { - return ( - - ); -} diff --git a/src/schema.ts b/src/schema.ts index 43b69a2..4af123a 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -2,7 +2,7 @@ import { TreeConfiguration, SchemaFactory } from '@fluid-experimental/tree2'; const sf = new SchemaFactory('d302b84c-75f6-4ecd-9663-524f467013e3'); -export class StringList extends sf.list('List', sf.string) { +export class StringList extends sf.list('StringList', sf.string) { // Moves the first item in the source list to the start of this list public moveToSourceList(source: StringList) { if (source.length > 0) this.moveToStart(0, source);