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(VBtn): disabled state background-color #12892

Merged
merged 4 commits into from Jan 5, 2021
Merged

Conversation

ElijahKotyluk
Copy link
Contributor

@ElijahKotyluk ElijahKotyluk commented Jan 5, 2021

add check to isElevated to ensure elevation prop is not null.

Description

fixes #12845

Motivation and Context

How Has This Been Tested?

playground

Markup:

<template>
  <div class="ma-12 pa-12">
    <v-card>
      <v-card-text>
        <v-container>
          <v-row
            align="center"
            justify="space-around"
            class="my-10"
          >
            <v-btn disabled>Disabled</v-btn>

            <v-btn color="red" :disabled="disabled"  outlined>outlined</v-btn>

            <v-btn color="primary"  :disabled="disabled" icon>
              <v-icon dark>
                mdi-vuetify
              </v-icon>
            </v-btn>

            <v-btn color="blue" :disabled="disabled" text>text</v-btn>

            <v-btn color="green" :disabled="disabled" elevation="5">elevated</v-btn>
          </v-row>

          <v-row
            align="center"
            justify="space-around"
            class="my-10"
          >
            <v-btn color="green"  :disabled="disabled"  plain>plain</v-btn>

            <v-btn color="red" depressed :disabled="disabled">depressed</v-btn>

            <v-btn color="blue" :disabled="disabled" rounded>rounded</v-btn>

            <v-btn color="primary" :disabled="disabled" tile>tile</v-btn>
          </v-row>
        </v-container>
      </v-card-text>
    </v-card>

    <v-row
      aligh="center"
      justify="center"
      class="my-10"
    >
      <v-btn color="black" @click="toggleDisabled">toggle</v-btn>
    </v-row>
  </div>
</template>
<script>
  export default {
    data () {
      return {
        disabled: false,
      }
    },
    methods: {
      toggleDisabled() {
        this.disabled = !this.disabled
      }
    },
  }
</script>

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

  • The PR title is no longer than 64 characters.
  • The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and backwards compatible changes and next for non-backwards compatible changes).
  • My code follows the code style of this project.
  • [] I've added relevant changes to the documentation (applies to new features and breaking changes in core library)

add check to isElevated to ensure elevation prop is not null.
@ElijahKotyluk ElijahKotyluk self-assigned this Jan 5, 2021
@ElijahKotyluk ElijahKotyluk added the C: VBtn VBtn label Jan 5, 2021
change bg color if disabled and outlined, plain, or text classes are present
@ElijahKotyluk ElijahKotyluk marked this pull request as ready for review January 5, 2021 02:28
@MajesticPotatoe MajesticPotatoe added the T: bug Functionality that does not work as intended/expected label Jan 5, 2021
@MajesticPotatoe MajesticPotatoe added this to the v2.4.x milestone Jan 5, 2021
@johnleider johnleider changed the title fix(VBtn): incorrect background states fix(VBtn): disabled state background-color Jan 5, 2021
@johnleider johnleider merged commit edf13fe into master Jan 5, 2021
@johnleider johnleider deleted the fix/v-btn-12845 branch January 5, 2021 22:42
KaelWD added a commit that referenced this pull request Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VBtn VBtn T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] v2.4 v-btn incorrect background states
3 participants