diff --git a/ui/components/src/BlockContainer/BlockContainer.tsx b/ui/components/src/BlockContainer/BlockContainer.tsx index 44851f449..5db3e4e4c 100644 --- a/ui/components/src/BlockContainer/BlockContainer.tsx +++ b/ui/components/src/BlockContainer/BlockContainer.tsx @@ -34,7 +34,7 @@ export interface BlockContainerOwnProps { */ 'data-testid'?: string; /** - * inner container variant. default to 'inner' to display a border and shadow + * inner container variant or plain */ plain?: boolean; } @@ -56,6 +56,11 @@ export const BlockContainer: FC = ({ }) => { const [isOpen, setIsOpen] = useState(true); const blockId = id !== '.' ? id : undefined || title; + const content = !plain ? ( + {children} + ) : ( + children + ); return ( {(blockId || title || collapsible) && ( @@ -94,17 +99,9 @@ export const BlockContainer: FC = ({ )} {description && {description}} {collapsible ? ( - - {!plain ? ( - {children} - ) : ( - children - )} - - ) : !plain ? ( - {children} + {content} ) : ( - children + content )} {!isOpen && }