vuetifyjs / vuetify

🐉 Vue Component Framework
https://vuetifyjs.com
MIT License
39.06k stars 6.91k forks source link

feat(VTooltip): Implemented color prop #19609

Closed sytexa-julia closed 1 week ago

sytexa-julia commented 2 weeks ago

Description

Resolves #19567 by implementing the color prop for VTooltip.

Markup:

<template>
  <v-app>
    <v-container>
      <template v-for="color in colors" :key="color">
        <div class="mb-2">
          <v-btn>
            {{ color.length ? color : 'Default' }}
            <v-tooltip
              v-model="show"
              :color="color"
              :text="`A ${color} tooltip!`"
              activator="parent"
              model-value
              @update:model-value=""
            />
          </v-btn>
        </div>
      </template>
    </v-container>
  </v-app>
</template>

<script>
  import { ref } from 'vue'
  export default {
    name: 'Playground',
    setup () {
      const colors = ref(['', 'primary', 'secondary', 'grey', 'red', 'grey-lighten-3'])
      return {
        colors,
      }
    },
  }
</script>