From 7a264ae572cf0e962f5e9c6767a6170f80ee79cc Mon Sep 17 00:00:00 2001 From: Dominik Schab <54962889+domschab23@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:50:59 -0500 Subject: [PATCH] ControlButtonGroup do not set bordered if child is a DOM element (#1298) --- src/ControlButtonGroup/ControlButtonGroup.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ControlButtonGroup/ControlButtonGroup.tsx b/src/ControlButtonGroup/ControlButtonGroup.tsx index d0793cfb..05aa3a05 100644 --- a/src/ControlButtonGroup/ControlButtonGroup.tsx +++ b/src/ControlButtonGroup/ControlButtonGroup.tsx @@ -36,7 +36,9 @@ function ControlButtonGroup({ onChange: handleChangeValue, } : {}; - if (row && child.props.bordered === undefined) { + const isDOMElement = typeof child.type === 'string'; + + if (!isDOMElement && row && child.props.bordered === undefined) { childProps.bordered = true; }