Skip to content

Commit

Permalink
add empty state preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Brittany Archibeque authored and Brittany Archibeque committed Dec 12, 2023
1 parent 23d906e commit 07c3034
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
12 changes: 3 additions & 9 deletions aries-site/src/data/structures/templates/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Notification } from 'grommet';
import {
ContentLayoutPreview,
CodeBlocksPreview,
EmptyStatePreview,
FeedbackPreview,
StatusIndicatorPreview,
ToastPreview,
Expand Down Expand Up @@ -1016,15 +1017,8 @@ export const templates = [
description: `An empty state refers to when the UI is
devoid of any data or information.`,
preview: {
image: {
src: {
light: '/templateImages/template-preview-banner-notification.svg',
// eslint-disable-next-line max-len
dark: '/templateImages/template-preview-banner-notification-invert.svg',
},
alt: 'Banner notification under HPE Global Application header.',
fit: 'contain',
},
component: () => <EmptyStatePreview />,
background: 'background-back',
},
seoDescription: `An empty state refers to when the UI is devoid of any
data or information.`,
Expand Down
18 changes: 18 additions & 0 deletions aries-site/src/examples/cardPreviews/emptystate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import { Box, Button, Heading, Paragraph } from 'grommet';
import { CircleInformation } from 'grommet-icons';

export const EmptyStatePreview = () => (
<Box gap="small" align="center" flex={false}>
<CircleInformation />
<Box align="center" gap="xsmall">
<Heading margin="none" size='small' level={4}>
No items exist
</Heading>
<Paragraph margin="none" textAlign="center">
Error message will be displayed here.
</Paragraph>
</Box>
<Button label="Action item" primary />
</Box>
);
1 change: 1 addition & 0 deletions aries-site/src/examples/cardPreviews/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export * from './checkbox';
export * from './checkboxgroup';
export * from './code-blocks';
export * from './content-layouts';
export * from './emptystate';
export * from './data-how-to';
export * from './dateinput';
export * from './feedback';
Expand Down

0 comments on commit 07c3034

Please sign in to comment.