From b1b296f25bd659e6e5a72bf30ed69ed4247d2e49 Mon Sep 17 00:00:00 2001 From: ajaypratap003 Date: Wed, 24 Apr 2024 16:39:26 +0530 Subject: [PATCH] implement review comments --- .../DataList/examples/DataListActions.tsx | 164 +++++++++--------- packages/react-core/src/demos/DataListDemo.md | 2 +- 2 files changed, 80 insertions(+), 86 deletions(-) diff --git a/packages/react-core/src/demos/DataList/examples/DataListActions.tsx b/packages/react-core/src/demos/DataList/examples/DataListActions.tsx index 9a642523254..97fc2f4ac72 100644 --- a/packages/react-core/src/demos/DataList/examples/DataListActions.tsx +++ b/packages/react-core/src/demos/DataList/examples/DataListActions.tsx @@ -19,6 +19,7 @@ import { } from '@patternfly/react-core'; import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; +import { Title } from '../../../../dist/js/components'; export const DataListActions: React.FunctionComponent = () => { const [isOpen, setIsOpen] = React.useState(false); @@ -33,104 +34,97 @@ export const DataListActions: React.FunctionComponent = () => { }; return ( - - - - - Projects - This is a demo that showcases PatternFly Data List - - - - {!isDeleted && ( - - - - Single actionable Primary content - , - Single actionable Secondary content - ]} - /> - - - - - - )} - + + + + Projects + This is a demo that showcases PatternFly Data List + + + + {!isDeleted && ( + - Multi actions Primary content + Single actionable Primary content , - Multi actions Secondary content + Single actionable Secondary content ]} /> - ) => ( - - - )} - isOpen={isOpen} - onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)} + - - - + )} + + + + Multi actions Primary content + , + Multi actions Secondary content + ]} + /> + + ) => ( + + + )} + isOpen={isOpen} + onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)} + > + + Action + {/* Prevent default onClick functionality for example + purposes */} + event.preventDefault()}> + Link + + + Disabled Action + + event.preventDefault()}> + Disabled Link + + + + + + + + ); }; diff --git a/packages/react-core/src/demos/DataListDemo.md b/packages/react-core/src/demos/DataListDemo.md index 499c9ee2b29..54a34190a93 100644 --- a/packages/react-core/src/demos/DataListDemo.md +++ b/packages/react-core/src/demos/DataListDemo.md @@ -29,7 +29,7 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard ```js file="./DataList/examples/DataListExpandableControlInToolbar.tsx" isFullscreen ``` -### Actions: single and multiple +### Actionable ```js file="./DataList/examples/DataListActions.tsx" isFullscreen ```