From 6b46c828e7425f8434a5cfcb467496f470137b8b Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Wed, 22 Nov 2023 13:44:39 +0100 Subject: [PATCH] Admin X demo app content (#19079) refs. https://github.com/TryGhost/Product/issues/4169 - Added demo content for POC AdminX demo app --- apps/admin-x-demo/src/MainContent.tsx | 240 +++++++++++++++++- .../admin-x-demo/src/components/DemoModal.tsx | 18 +- .../.storybook/storybook.css | 4 + apps/admin-x-design-system/preflight.css | 17 +- .../src/global/Button.tsx | 5 +- .../src/global/ButtonGroup.stories.tsx | 20 +- .../src/global/ButtonGroup.tsx | 23 +- .../src/global/Tooltip.stories.tsx | 7 +- .../layout/{PageMenu.tsx => AppMenu.tsx} | 0 .../src/global/layout/Page.stories.tsx | 111 ++++---- .../src/global/layout/Page.tsx | 128 +++++++--- .../src/global/layout/PageHeader.tsx | 2 +- .../global/layout/ViewContainer.stories.tsx | 39 +-- .../src/global/layout/ViewContainer.tsx | 92 ++++++- .../src/global/table/DynamicTable.stories.tsx | 3 +- .../src/global/table/DynamicTable.tsx | 15 +- apps/admin-x-design-system/src/index.ts | 14 +- .../admin-x-design-system/tailwind.config.cjs | 4 +- ghost/admin/app/styles/layouts/main.css | 4 +- 19 files changed, 599 insertions(+), 147 deletions(-) rename apps/admin-x-design-system/src/global/layout/{PageMenu.tsx => AppMenu.tsx} (100%) diff --git a/apps/admin-x-demo/src/MainContent.tsx b/apps/admin-x-demo/src/MainContent.tsx index f6f68421bc..36c305d85e 100644 --- a/apps/admin-x-demo/src/MainContent.tsx +++ b/apps/admin-x-demo/src/MainContent.tsx @@ -1,12 +1,244 @@ -import {Button} from '@tryghost/admin-x-design-system'; +import {Avatar, Button, ButtonGroup, DynamicTable, DynamicTableColumn, DynamicTableRow, Heading, Hint, Page, SortMenu, ViewContainer} from '@tryghost/admin-x-design-system'; import {useRouting} from '@tryghost/admin-x-framework/routing'; +import {useState} from 'react'; const MainContent = () => { const {updateRoute} = useRouting(); + const [view, setView] = useState('list'); - return
-
; + const dummyActions = [ +