From fe865a43edb2b53634376b567ea2ce3f0a9bd3ec Mon Sep 17 00:00:00 2001 From: ajaypratap003 Date: Tue, 2 Apr 2024 22:57:59 +0530 Subject: [PATCH] Descriptionlist complex content demo --- .../demos/DescriptionList/DescriptionList.md | 25 ++++ .../DescriptionListComplexContent.tsx | 129 ++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 packages/react-core/src/demos/DescriptionList/DescriptionList.md create mode 100644 packages/react-core/src/demos/DescriptionList/examples/DescriptionListComplexContent.tsx diff --git a/packages/react-core/src/demos/DescriptionList/DescriptionList.md b/packages/react-core/src/demos/DescriptionList/DescriptionList.md new file mode 100644 index 00000000000..97ae3c4cd60 --- /dev/null +++ b/packages/react-core/src/demos/DescriptionList/DescriptionList.md @@ -0,0 +1,25 @@ +--- +id: Description list +section: components +--- + +import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon'; +import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; +import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon'; +import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon'; +import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon'; +import ThIcon from '@patternfly/react-icons/dist/esm/icons/th-icon'; +import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; +import imgAvatar from '@patternfly/react-core/src/components/assets/avatarImg.svg'; +import pfIcon from '../assets/pf-logo-small.svg'; +import pfLogo from '../assets/pf-logo.svg'; +import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { Link } from '@reach/router'; +import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; + +## Demos + +### Complex content + +```js file='./examples/DescriptionListComplexContent.tsx' isFullscreen +``` \ No newline at end of file diff --git a/packages/react-core/src/demos/DescriptionList/examples/DescriptionListComplexContent.tsx b/packages/react-core/src/demos/DescriptionList/examples/DescriptionListComplexContent.tsx new file mode 100644 index 00000000000..f48d50f8d2d --- /dev/null +++ b/packages/react-core/src/demos/DescriptionList/examples/DescriptionListComplexContent.tsx @@ -0,0 +1,129 @@ +import React from 'react'; +import { + DescriptionList, + DescriptionListTerm, + DescriptionListGroup, + DescriptionListDescription, + PageSection, + PageSectionVariants, + TextContent, + Text, + Grid, + GridItem, + Divider, + Title +} from '@patternfly/react-core'; +import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table'; +import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; + +export const DescriptionListComplexContent: React.FunctionComponent = () => ( + + + + Main title + This is a full page demo. + + + + + + + + + Service overview + + + + + Name + Example + + + Label + No label + + + Annotations + 2 Annotations + + + Created at: + 3 minutes ago + + + Namespace + ajay-test + + + Pod selector + app=MyApp + + + Session affi nity + None + + + + + + + + + Service routing + + + + + Service address + + + + + + + + + + + + + + + + + + +
TypeLocation
Cluster IP172.30.126.106
Accessible within the cluster onlyn/a
+
+
+ + Service port mapping + + + + + + + + + + + + + + + + + + +
NamePortProtocolPod port or ...
test80TCP80
+
+
+
+
+
+
+
+
+
+);