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

fix(button): take left and right icons into consideration for button loading state #4353

Merged
merged 2 commits into from
Jul 12, 2021

Conversation

dsumer
Copy link
Contributor

@dsumer dsumer commented Jul 9, 2021

📝 Description

This is a fix so that the left and right icon of a button also stay in the DOM while the button isLoading to avoid jumping button elements.

⛳️ Current behavior (updates)

Currently, the left and right icons of a button don't get rendered when the button is in the loading state, which leads to less width of the button, leading to unwanted layout shifts.

🚀 New behavior

The left and right icons also get rendered when the button is in the loading state and will be hidden with opacity 0 like the rest of the children.

💣 Is this a breaking change (Yes/No):

No

@changeset-bot
Copy link

changeset-bot bot commented Jul 9, 2021

🦋 Changeset detected

Latest commit: bafcc39

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@chakra-ui/button Patch
@chakra-ui/react Patch
@chakra-ui/test-utils Patch
@chakra-ui/props-docs Patch
@chakra-ui/docs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jul 9, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/chakra-ui/chakra-ui/E2nCnXvQT5QddXGLr9naG3Wu9CEa
✅ Preview: Failed

[Deployment for bafcc39 failed]

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 9, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bafcc39:

Sandbox Source
create-react-app-ts Configuration

@with-heart
Copy link
Contributor

I added a changeset file (.changeset/cold-guests-hug.md) so @chakra-ui/button will receive a version bump for this change and will generate a CHANGELOG entry.

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

Successfully merging this pull request may close these issues.

None yet

3 participants