From 6eb54203bb586060e5cc046f39754d26316872b2 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Sat, 29 Oct 2022 14:57:24 +0800 Subject: [PATCH] [ui][collapsible] allow label to be react nodes --- packages/ui/src/Collapsible/Collapsible.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/Collapsible/Collapsible.tsx b/packages/ui/src/Collapsible/Collapsible.tsx index 211c54fd..7c58d172 100644 --- a/packages/ui/src/Collapsible/Collapsible.tsx +++ b/packages/ui/src/Collapsible/Collapsible.tsx @@ -6,7 +6,7 @@ import { ChevronDownIcon } from '@heroicons/react/20/solid'; type Props = Readonly<{ children: ReactNode; defaultOpen?: boolean; - label: string; + label: ReactNode; }>; export default function Collapsible({ children, defaultOpen, label }: Props) { @@ -14,10 +14,10 @@ export default function Collapsible({ children, defaultOpen, label }: Props) { {({ open }) => ( <> - +