Sha256: 47f7d6f4d961c8ff2b079214e9084100a69781a7c75dd79e727b9a2c6c2aaccf

Contents?: true

Size: 868 Bytes

Versions: 4

Compression:

Stored size: 868 Bytes

Contents

<template>
  <submit-button
    type="button"
    class="block text-white bg-opacity-95 hover:bg-opacity-100 transition-colors duration-200"
    :class="{
      'w-40 h-full': big,
      'rounded-sm py-2 px-4 text-center w-32 border border-opacity-0': !big,
    }"
    defaultColorClass="bg-editor-primary"
    :labels="$t('headerNav.saveButton')"
    :buttonState="buttonState"
    @click="save"
  />
</template>

<script>
export default {
  name: 'SaveButton',
  props: {
    big: { type: Boolean, default: false },
  },
  computed: {
    buttonState() {
      return this.$store.state.ui.saveButtonState
    },
  },
  methods: {
    async save() {
      await this.$store.dispatch('persistPage')
    },
  },
}
</script>

<style scoped>
.bg-editor-primary {
  background-color: rgba(
    var(--editor-color-primary-non-hex),
    var(--tw-bg-opacity)
  );
}
</style>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
maglevcms-1.0.0 app/javascript/editor/components/header-nav/save-button.vue
maglevcms-1.0.0.rc3 app/javascript/editor/components/header-nav/save-button.vue
maglevcms-1.0.0.rc2 app/javascript/editor/components/header-nav/save-button.vue
maglevcms-1.0.0.rc1 app/javascript/editor/components/header-nav/save-button.vue