Skip to content

fix: elevation being applied after mode changes on a button while it shouldn't#1037

Merged
ferrannp merged 1 commit intocallstack:masterfrom
jordy758:patch-1
May 9, 2019
Merged

fix: elevation being applied after mode changes on a button while it shouldn't#1037
ferrannp merged 1 commit intocallstack:masterfrom
jordy758:patch-1

Conversation

@jordy758
Copy link
Copy Markdown
Contributor

@jordy758 jordy758 commented Apr 30, 2019

Motivation

The wrong elevation is being applied to an outlined button when it is first being rendered as a contained button.

Reproduce steps:

  1. Render a button using mode={this.propsIsContained ? 'contained' : 'outline'} and set propsIsContained = 'true'.
  2. Change the property in the component to false during runtime propsIsContained = false
  3. Observe that elevation is applied on the outlined button while it shouldn't.

WRONG
image

GOOD
image

FYI: duplicate of #1019 didn't know how to update that one.

@callstack-bot
Copy link
Copy Markdown

Hey @jordy-wijman, thank you for your pull request 🤗. The documentation from this branch can be viewed here. Please remember to update Typescript types if you changed API.

@ferrannp ferrannp merged commit 4b8d591 into callstack:master May 9, 2019
@ferrannp
Copy link
Copy Markdown
Collaborator

ferrannp commented May 9, 2019

Thanks!

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.

3 participants