Open dhe128 opened 9 months ago
<ButtonGroup theme={{position: {start: 'x'}}}> <Button /> </ButtonGroup>
First button in button group should have class="x"
class="x"
class="x" is missing
Button component doesn't use props.theme of parent ButtonGroup.
props.theme
https://github.com/themesberg/flowbite-react/blob/4fd01e5a5631c30ea65f90fd23856eae8014ccad/src/components/Button/Button.tsx#L118
Known issue, its because ButtonGroup uses React.cloneElement under the hood to inject some props, but does not apply top level theme override configuration.
ButtonGroup
React.cloneElement
theme
Will be fixed in the next patch.
Steps to reproduce
Current behavior
First button in button group should have
class="x"
Expected behavior
class="x"
is missingContext
Button component doesn't use
props.theme
of parent ButtonGroup.https://github.com/themesberg/flowbite-react/blob/4fd01e5a5631c30ea65f90fd23856eae8014ccad/src/components/Button/Button.tsx#L118