Skip to content

Commit

Permalink
feat(EmptyDetailsView): add component
Browse files Browse the repository at this point in the history
  • Loading branch information
adamviktora committed Nov 22, 2024
1 parent 5e8d74f commit 074fcda
Show file tree
Hide file tree
Showing 6 changed files with 569 additions and 1 deletion.
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"

```
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>}
/>
);
Loading

0 comments on commit 074fcda

Please sign in to comment.