Skip to content

Commit

Permalink
fix: details view in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 26, 2023
1 parent 807e076 commit 991815b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ const props = withDefaults(defineProps<{
direction: 'bottom',
})
const { width, height } = useWindowSize()
const isSmall = computed(() => width.value < 700 || height.value < 700)
const positionClass = computed(() => {
if (isSmall.value)
return 'bottom-0 left-0 right-0 top-0 of-auto'
switch (props.direction) {
case 'bottom':
return 'bottom-0 left-0 right-0 border-t'
Expand Down

0 comments on commit 991815b

Please sign in to comment.