-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(EmptyDetailsView): add component
- Loading branch information
1 parent
5e8d74f
commit 074fcda
Showing
6 changed files
with
569 additions
and
1 deletion.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...es/module/patternfly-docs/content/examples/EmptyDetailsView/EmptyDetailsView.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
# Sidenav top-level section | ||
# should be the same for all markdown files | ||
section: AI-infra-ui-components | ||
# Sidenav secondary level section | ||
# should be the same for all markdown files | ||
id: EmptyDetailsView | ||
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility) | ||
source: react | ||
# If you use typescript, the name of the interface to display props for | ||
# These are found through the sourceProps function provided in patternfly-docs.source.js | ||
propComponents: ['EmptyDetailsView'] | ||
--- | ||
|
||
import { EmptyDetailsView } from "@patternfly/ai-infra-ui-components"; | ||
import clusterImage from './empty-state-cluster-storage.svg' | ||
|
||
Note: this component documents the API and enhances the [existing EmptyDetailsView](https://github.com/opendatahub-io/odh-dashboard/blob/main/frontend/src/components/EmptyDetailsView.tsx) component from odh-dashboard. It can be imported from [@patternfly/ai-infra-ui-components](https://www.npmjs.com/package/@patternfly/AI-infra-ui-components). Alternatively, it can be used within the odh-dashboard via the import: `~/components/EmptyDetailsView` | ||
|
||
### Example | ||
|
||
```js file="./EmptyDetailsViewBasic.tsx" | ||
|
||
``` |
15 changes: 15 additions & 0 deletions
15
packages/module/patternfly-docs/content/examples/EmptyDetailsView/EmptyDetailsViewBasic.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import { EmptyDetailsView } from '@patternfly/ai-infra-ui-components'; | ||
import { Button } from '@patternfly/react-core'; | ||
import clusterImage from './empty-state-cluster-storage.svg'; | ||
|
||
export const EmptyDetailsViewBasic: React.FunctionComponent = () => ( | ||
<EmptyDetailsView | ||
title="Start by adding cluster storage" | ||
description="Cluster storage saves your project’s data on a selected cluster. You can optionally connect cluster storage to a workbench." | ||
iconImage={clusterImage} | ||
imageSize="240px" | ||
imageAlt="add cluster storage" | ||
createButton={<Button>Add cluster storage</Button>} | ||
/> | ||
); |
Oops, something went wrong.