Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button in ButtonGroup ignores theme prop #1252

Open
dhe128 opened this issue Jan 29, 2024 · 1 comment
Open

Button in ButtonGroup ignores theme prop #1252

dhe128 opened this issue Jan 29, 2024 · 1 comment

Comments

@dhe128
Copy link

dhe128 commented Jan 29, 2024

Steps to reproduce

<ButtonGroup theme={{position: {start: 'x'}}}>
  <Button />
</ButtonGroup>

Current behavior

First button in button group should have class="x"

Expected behavior

class="x" is missing

Context

Button component doesn't use props.theme of parent ButtonGroup.

const { buttonGroup: groupTheme, button: buttonTheme } = getTheme();

@dhe128 dhe128 changed the title Button in ButtonGroup ignore theme prop Button in ButtonGroup ignores theme prop Jan 29, 2024
@SutuSebastian
Copy link
Collaborator

Known issue, its because ButtonGroup uses React.cloneElement under the hood to inject some props, but does not apply top level theme override configuration.

Will be fixed in the next patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants