Sha256: f87e7a9ea352c11359eba2846b7b4fc63258d33a258600f8fb64539fb879a38c

Contents?: true

Size: 928 Bytes

Versions: 16

Compression:

Stored size: 928 Bytes

Contents

<template>
    <div class="notif-overlay">
      <transition-group name="fade-top">
        <div :class="[{'alert-success': notification.success, 'alert-danger': notification.error}, 'alert', 'notification-item']" :key="notification" v-for="notification in notifications">
          <p>{{ notification.msg }}</p>
        </div>
      </transition-group>
    </div>
</template>

<script>
import {mapState} from 'vuex'

export default {
  computed: {
    ...mapState('overlayStore', ['notifications'])
  }
}
</script>

<style media="screen" lang='sass'>
.notif-overlay
  position: fixed
  bottom: 20px
  right: 20px

.notification-item
  width: 300px
  height: 100px
  margin: 5px

  &.error
    background-color: red
    color: white
  &.success
    background-color: #c3f0cc
    color: #3daa41


.fade-top-enter-active, .fade-top-leave-active
  transition: all 400ms

.fade-top-enter, .fade-top-leave-to
  opacity: 0


</style>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rails_admin_image_manager-0.1.34 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.33 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.31 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.30 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.3 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.29 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.28 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.27 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.26 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.25 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.24 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.23 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.22 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.21 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.20 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue
rails_admin_image_manager-0.1.15 app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue