Skip to content

Commit

Permalink
Merge pull request #5883 from kodadot/feat-neo-modal-move
Browse files Browse the repository at this point in the history
#5853 neo modal
  • Loading branch information
vikiival authored May 12, 2023
2 parents caf99b9 + de7f6de commit 1fc5daa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
11 changes: 6 additions & 5 deletions components/gallery/GalleryItemPreviewer.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<template>
<b-modal
<NeoModal
v-model="isFullscreen"
:destroy-on-hide="false"
:can-cancel="false"
full-screen
custom-class="gallery-item-modal"
custom-content-class="gallery-item-modal-content">
root-class="gallery-item-modal"
content-class="gallery-item-modal-content"
@close="isFullscreen = false">
<NeoButton class="back-button" @click.native="emit('input', false)">
<NeoIcon icon="chevron-left" />
{{ $t('go back') }}
Expand All @@ -21,12 +22,12 @@
:title="nft?.name || nft?.id"
original />
</div>
</b-modal>
</NeoModal>
</template>
<script setup lang="ts">
import { useVModel } from '@vueuse/core'
import { MediaItem, NeoButton, NeoIcon } from '@kodadot1/brick'
import { MediaItem, NeoButton, NeoIcon, NeoModal } from '@kodadot1/brick'
import { useGalleryItem } from './useGalleryItem'
const { nft, nftAnimation, nftMimeType } = useGalleryItem()
const { placeholder } = useTheme()
Expand Down
14 changes: 13 additions & 1 deletion libs/ui/src/components/NeoModal/NeoModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
class="neo-modal"
scroll="clip"
:active.sync="isModalActive"
:destroy-on-hide="destroyOnHide"
:can-cancel="canCancel"
:full-screen="fullScreen"
:content-class="contentClass"
:root-class="rootClass"
@close="updateClose">
<slot />
</o-modal>
Expand All @@ -15,10 +19,18 @@ import { OModal } from '@oruga-ui/oruga'
const props = withDefaults(
defineProps<{
value: boolean
canCancel?: string[] | boolean
destroyOnHide?: boolean
canCancel?: boolean
fullScreen?: boolean
contentClass?: boolean
rootClass?: boolean
}>(),
{
destroyOnHide: true,
canCancel: true,
fullScreen: false,
contentClass: false,
rootClass: false,
}
)
Expand Down

0 comments on commit 1fc5daa

Please sign in to comment.