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

feat(vcolorpicker): add hideSliders prop #12618

Merged
merged 1 commit into from
Nov 17, 2020
Merged

feat(vcolorpicker): add hideSliders prop #12618

merged 1 commit into from
Nov 17, 2020

Conversation

Mikilll94
Copy link
Contributor

@Mikilll94 Mikilll94 commented Nov 15, 2020

Added the ability to hide sliders in VColorPicker.

This is the same what has been done in #11827. However this PR had some merge conflicts and it seems like it is abondoned now. That's why I have created a new PR.

re #11138

Description

resolves #11138

Added new prop hide-sliders for in VColorPicker. When this prop is true, the sliders are hidden.

Motivation and Context

Right it is not possible to have a VColorPicker with swatches only. Thanks, to the new prop, you can hide canvas, inputs and sliders, which gives the possibility to show only swatches.

How Has This Been Tested?

visually and unit tests

Markup:

<template>
  <v-container>
    <v-color-picker v-model="color" show-swatches :swatches="swatches" hide-sliders hide-inputs hide-canvas />
    <div>color</div>
    <pre>{{ color }}</pre>
  </v-container>
</template>

<script>
export default {
  data() {
    return {
      color: { r: 255, g: 0, b: 0, a: 1 },
      swatches: [
        ["#FF0000", "#AA0000", "#550000"],
        ["#FFFF00", "#AAAA00", "#555500"],
        ["#00FF00", "#00AA00", "#005500"],
        ["#00FFFF", "#00AAAA", "#005555"],
        ["#0000FF", "#0000AA", "#000055"],
      ],
    };
  },
};
</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)

Added the ability to hide sliders in VColorPicker.

re #11138
@KaelWD KaelWD added this to the v2.4.0 milestone Nov 17, 2020
@KaelWD KaelWD merged commit e35d79b into vuetifyjs:dev Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] v-color-picker new prop to hide sliders / show swatches only ?
3 participants