From 55ee05da874580599b71101f13fd666c7ebd7f66 Mon Sep 17 00:00:00 2001 From: Riccardo Forina Date: Wed, 27 Nov 2024 11:34:55 +0100 Subject: [PATCH] Button to go to the designer view quickly --- packages/ui/src/components/Section.tsx | 41 ++++++++++++++----- packages/ui/src/documentDesigner/Designer.tsx | 8 ++++ .../src/documentDesigner/DesignerLayout.tsx | 25 ++++++++--- 3 files changed, 59 insertions(+), 15 deletions(-) diff --git a/packages/ui/src/components/Section.tsx b/packages/ui/src/components/Section.tsx index 143c825..a5dc482 100644 --- a/packages/ui/src/components/Section.tsx +++ b/packages/ui/src/components/Section.tsx @@ -1,36 +1,57 @@ import { ReactNode } from "react"; import { Badge, + Button, Card, CardBody, + CardHeader, CardTitle, Split, SplitItem, } from "@patternfly/react-core"; +import { PencilAltIcon } from "@patternfly/react-icons"; export function Section({ title, count, id, children, + onEdit, }: { title: ReactNode; count?: number; id: string; children: ReactNode; + onEdit?: () => void; }) { return ( - - - {title} - {count !== undefined && ( - - {count} - - )} - - + + {onEdit && ( +