From c570281e434bed5d46728b1c0cf16d05fe835c37 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Mon, 15 Jan 2024 17:13:53 +0700 Subject: [PATCH] Add model right panel on api dashboard --- web/containers/CardSidebar/index.tsx | 27 ++++++++----- web/screens/LocalServer/index.tsx | 59 +++++++++++++++++++++++++--- 2 files changed, 70 insertions(+), 16 deletions(-) diff --git a/web/containers/CardSidebar/index.tsx b/web/containers/CardSidebar/index.tsx index 4954cbd00..fb924672c 100644 --- a/web/containers/CardSidebar/index.tsx +++ b/web/containers/CardSidebar/index.tsx @@ -19,8 +19,14 @@ interface Props { children: ReactNode title: string asChild?: boolean + hideMoreVerticalAction?: boolean } -export default function CardSidebar({ children, title, asChild }: Props) { +export default function CardSidebar({ + children, + title, + asChild, + hideMoreVerticalAction, +}: Props) { const [show, setShow] = useState(true) const [more, setMore] = useState(false) const [menu, setMenu] = useState(null) @@ -52,15 +58,16 @@ export default function CardSidebar({ children, title, asChild }: Props) { > {title}
- {!asChild && ( -
setMore(!more)} - > - -
- )} + {!asChild || + (hideMoreVerticalAction && ( +
setMore(!more)} + > + +
+ ))}
)