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(VChip): add base-color prop #20702

Merged
merged 2 commits into from
Dec 2, 2024
Merged

feat(VChip): add base-color prop #20702

merged 2 commits into from
Dec 2, 2024

Conversation

J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Nov 15, 2024

Description

Very quick fix, I did not dwell on it too much.

  • check all relevant examples in docs

resolves #19678

Markup:

Playground
<template>
  <v-row justify="center">
    <v-col cols="12" sm="7" md="6" lg="5">
      <h5 class="mt-6 mb-3">`base-color` + `selected-class`</h5>
      <v-sheet elevation="10" rounded="xl">
        <div class="pa-4">
          <!--These chips should be red -->
          <v-chip-group column>
            <v-chip base-color="red" selected-class="text-primary" v-for="tag in 3" :key="tag">
              chip {{ tag }}
            </v-chip>
          </v-chip-group>

          <!--These chips should be red as well -->
          <v-chip-group selected-class="text-primary" column base-color="red">
            <v-chip v-for="tag in 3" :key="tag">
              chip {{ tag }}
            </v-chip>
          </v-chip-group>

          <!--without chip-group -->
          <div class="d-flex ga-2 py-2">
            <v-chip base-color="red">base color</v-chip>
            <v-chip color="red">color</v-chip>
          </div>
        </div>
      </v-sheet>

      <h5 class="mt-6 mb-3">Without `selected-class`</h5>
      <v-sheet elevation="10" rounded="xl">
        <div class="pa-4">
          <!--These chips should be red -->
          <v-chip-group colum>
            <v-chip base-color="red" color="green" v-for="tag in 4" :key="tag">
              chip {{ tag }}
            </v-chip>
          </v-chip-group>

          <!--These chips should be red as well -->
          <v-chip-group column base-color="red" color="green">
            <v-chip v-for="tag in 4" :key="tag">
              chip {{ tag }}
            </v-chip>
          </v-chip-group>
        </div>
      </v-sheet>
    </v-col>
  </v-row>
</template>

@J-Sek J-Sek self-assigned this Nov 15, 2024
@J-Sek J-Sek added T: bug Functionality that does not work as intended/expected C: VChipGroup labels Nov 16, 2024
Copy link
Member

@KaelWD KaelWD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the typical case of color without active-class, now you can't tell what's selected:
Screenshot_20241120_170434 Screenshot_20241120_170518

It probably needs a new baseColor prop like lists and buttons have.

@J-Sek J-Sek requested a review from KaelWD November 22, 2024 20:17
@KaelWD KaelWD added this to the v3.8.0 (Andromeda) milestone Nov 27, 2024
@KaelWD KaelWD changed the title fix(VChipGroup): chip color propagation feat(VChip): add base-color prop Nov 27, 2024
@KaelWD KaelWD added T: enhancement Functionality that enhances existing features C: VChip VChip and removed T: bug Functionality that does not work as intended/expected C: VChipGroup labels Nov 27, 2024
@KaelWD KaelWD changed the base branch from master to dev November 27, 2024 12:54
@KaelWD KaelWD merged commit 1e099f2 into vuetifyjs:dev Dec 2, 2024
10 checks passed
@J-Sek J-Sek deleted the fix/19678 branch December 3, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VChip VChip T: enhancement Functionality that enhances existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.5.17] Can't change color of chips in v-chip-group
2 participants