From 8cac32b563a1d56bbed4572a2cd423503b295655 Mon Sep 17 00:00:00 2001 From: mfrachet Date: Fri, 10 Sep 2021 17:07:22 +0200 Subject: [PATCH] Add page template --- .../PageTemplate/PageTemplate.stories.mdx | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 packages/core/helper-plugin/lib/src/components/PageTemplate/PageTemplate.stories.mdx diff --git a/packages/core/helper-plugin/lib/src/components/PageTemplate/PageTemplate.stories.mdx b/packages/core/helper-plugin/lib/src/components/PageTemplate/PageTemplate.stories.mdx new file mode 100644 index 0000000000..92fa9e33bf --- /dev/null +++ b/packages/core/helper-plugin/lib/src/components/PageTemplate/PageTemplate.stories.mdx @@ -0,0 +1,64 @@ + + +import { Meta, ArgsTable, Canvas, Story } from '@storybook/addon-docs'; +import { Main, Layout, HeaderLayout, Button, ActionLayout, ContentLayout,Box } from '@strapi/parts'; +import AddIcon from '@strapi/icons/AddIcon' +import EditIcon from '@strapi/icons/EditIcon' +import LoadingIndicatorPage from '../LoadingIndicatorPage'; +import NoContent from '../NoContent' +import NoPermissions from '../NoPermissions' + + + +# PageTemplate + +This component is used to display an empty state. + +## Usage + + + + {() => { + const canRead = false; + const isLoading = true; + const data = []; + return ( + + +
+ }>Add an entry} + secondaryAction={ + + } + title="Other CT" + subtitle="36 entries found" + /> + + + + + } + endActions={ + <> + + + } + /> + + {!canRead && } + {(data && data.length === 0) && Add content}/>} + {isLoading && } + +
+
+
+ ); + }} +
+