diff --git a/src/screens/component-catalog/components.tsx b/src/screens/component-catalog/components.tsx index f620c8a2..32a41595 100644 --- a/src/screens/component-catalog/components.tsx +++ b/src/screens/component-catalog/components.tsx @@ -4,6 +4,7 @@ import { CardPreviewStory } from "./card-preview-story.tsx"; import { SelectStory } from "./select-story.tsx"; import { PieChartCanvasStory } from "./pie-chart-canvas-story.tsx"; import { SnackbarStory } from "./snackbar-story.tsx"; +import { ListStory } from "./list-story.tsx"; export type Component = { name: string; @@ -45,15 +46,19 @@ export const components: Array = [ ), }, { - name: "Select", + name: SelectStory.name, component: , }, { - name: "PieChart", + name: PieChartCanvasStory.name, component: , }, { name: SnackbarStory.name, component: , }, + { + name: ListStory.name, + component: , + }, ]; diff --git a/src/screens/component-catalog/list-story.tsx b/src/screens/component-catalog/list-story.tsx new file mode 100644 index 00000000..93d7936d --- /dev/null +++ b/src/screens/component-catalog/list-story.tsx @@ -0,0 +1,48 @@ +import { CardNumber } from "../../ui/card-number.tsx"; +import { css, cx } from "@emotion/css"; +import { theme } from "../../ui/theme.tsx"; +import { reset } from "../../ui/reset.ts"; +import { List } from "../../ui/list.tsx"; +import React from "react"; + +export const ListStory = () => { + return ( + ({ + text: ( +
+
+ + Test title +
+
+ Test description Test description Test description Test + description Test description +
+
+ ), + right: ( + + ), + }))} + /> + ); +}; diff --git a/src/screens/folder-review/folder-preview.tsx b/src/screens/folder-review/folder-preview.tsx index c582146a..68f63aad 100644 --- a/src/screens/folder-review/folder-preview.tsx +++ b/src/screens/folder-review/folder-preview.tsx @@ -203,7 +203,11 @@ export const FolderPreview = observer(() => { deckListStore.goDeckById(deck.id); }, text: deck.name, - right: , + right: ( +
+ +
+ ), }))} /> {folder.cardsToReview.length === 0 && diff --git a/src/ui/list.tsx b/src/ui/list.tsx index 40531c6b..07cb41c4 100644 --- a/src/ui/list.tsx +++ b/src/ui/list.tsx @@ -92,14 +92,7 @@ export const List = observer((props: Props) => { {item.text} {item.right ? ( - - {item.right} - +
{item.right}
) : null}