Sha256: dbf7301876863d8ea68c49355c5ea28b1111c356dcab19d86127319943101c34

Contents?: true

Size: 970 Bytes

Versions: 10

Compression:

Stored size: 970 Bytes

Contents

<template>
  <div>
    <label class="block font-semibold text-gray-800" :for="name">
      {{ label }}
    </label>
    <div class="flex gap-2 mt-1">
      <select
        v-model="selectedOption"
        class="block w-full mt-1 py-2 px-3 rounded bg-gray-100 text-gray-800 focus:outline-none focus:ring placeholder-gray-500"
      >
        <option v-for="option in selectOptions" :key="option" :value="option">
          {{ option }}
        </option>
      </select>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Simple-Select',
  props: {
    label: { type: String, default: 'Label' },
    name: { type: String, default: 'select' },
    value: { type: String },
    selectOptions: {
      type: Array,
      default: function () {
        return []
      },
    },
  },
  computed: {
    selectedOption: {
      get() {
        return this.value
      },
      set(option) {
        this.$emit('input', option)
      },
    },
  },
}
</script>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
maglevcms-1.1.5 app/frontend/editor/components/kit/simple-select.vue
maglevcms-1.1.4 app/frontend/editor/components/kit/simple-select.vue
maglevcms-1.1.3 app/frontend/editor/components/kit/simple-select.vue
maglevcms-1.1.2 app/frontend/editor/components/kit/simple-select.vue
maglevcms-1.1.1 app/frontend/editor/components/kit/simple-select.vue
maglevcms-1.1.0 app/frontend/editor/components/kit/simple-select.vue
maglevcms-1.0.0 app/javascript/editor/components/kit/simple-select.vue
maglevcms-1.0.0.rc3 app/javascript/editor/components/kit/simple-select.vue
maglevcms-1.0.0.rc2 app/javascript/editor/components/kit/simple-select.vue
maglevcms-1.0.0.rc1 app/javascript/editor/components/kit/simple-select.vue