Sha256: 6c23698b7bf5fac1eb411188b0c2d876af906b478644dd69e1de7cadbd4dec01

Contents?: true

Size: 694 Bytes

Versions: 24

Compression:

Stored size: 694 Bytes

Contents

<template>
  <button
    class="flex items-center justify-center h-6 w-6 text-sm rounded-sm"
    :class="buttonClass"
    @click="$emit('click', page)"
  >
    <slot>
      {{ page }}
    </slot>
  </button>
</template>

<script>
export default {
  name: 'PageButton',
  props: {
    page: { required: true },
    activePage: { type: Number },
  },
  computed: {
    buttonClass() {
      return {
        'bg-white': !this.enabled,
        'hover:bg-gray-100': !this.enabled,
        'text-gray-900': !this.enabled,
        'bg-editor-primary': this.enabled,
        'text-white': this.enabled,
      }
    },
    enabled() {
      return this.page === this.activePage
    },
  },
}
</script>

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
maglevcms-1.7.3 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.7.2 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.7.1 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.7.0 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.6.1 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.6.0 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.5.1 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.4.0 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.3.0 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.2.2 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.2.1 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.2.0 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.1.7 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.1.6 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.1.5 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.1.4 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.1.3 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.1.2 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.1.1 app/frontend/editor/components/kit/pagination/button.vue
maglevcms-1.1.0 app/frontend/editor/components/kit/pagination/button.vue