Sha256: 1b8cdf7be16a8c47279379cef2f0d39c126c9c77160b9f1dacd71917365cf432

Contents?: true

Size: 1 KB

Versions: 7

Compression:

Stored size: 1 KB

Contents

<template>
  <uikit-dropdown v-on="$listeners" class="absolute top-1.5 right-1">
    <template v-slot:button>
      <button
        class="px-1 py-1 hover:text-gray-900 focus:outline-none transition-colors duration-200"
      >
        <uikit-icon name="ri-palette-line" size="1.25rem" />
      </button>
    </template>
    <template v-slot:content>
      <div class="flex flex-wrap gap-1">
        <preset-button
          v-for="preset in presets"
          v-model="updatableValue"
          :preset="preset"
          :key="preset"
        />
      </div>
    </template>
  </uikit-dropdown>
</template>

<script>
import PresetButton from './preset-button.vue'

export default {
  name: 'PresetDropdown',
  components: { PresetButton },
  props: {
    value: { type: String },
    presets: {
      type: Array,
      default: () => [],
    },
  },
  computed: {
    updatableValue: {
      get() {
        return this.value
      },
      set(color) {
        this.$emit('input', color)
      },
    },
  },
}
</script>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
maglevcms-1.7.3 app/frontend/editor/components/kit/color-input/preset-dropdown.vue
maglevcms-1.7.2 app/frontend/editor/components/kit/color-input/preset-dropdown.vue
maglevcms-1.7.1 app/frontend/editor/components/kit/color-input/preset-dropdown.vue
maglevcms-1.7.0 app/frontend/editor/components/kit/color-input/preset-dropdown.vue
maglevcms-1.6.1 app/frontend/editor/components/kit/color-input/preset-dropdown.vue
maglevcms-1.6.0 app/frontend/editor/components/kit/color-input/preset-dropdown.vue
maglevcms-1.5.1 app/frontend/editor/components/kit/color-input/preset-dropdown.vue