Skip to content

Commit

Permalink
fix(dialog): resolving #128 - 'relative' option is broken as elements…
Browse files Browse the repository at this point in the history
… being appended to body
  • Loading branch information
jmillar-nanthealth committed Aug 15, 2022
1 parent d3f8c67 commit 05e504c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/.vuepress/examples/Dialog/Relative.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:aria-expanded="visible ? 'true' : 'false'"
>Open Dialog</FeatherButton
>
<div class="relative">
<div class="relative-demo">
<div style="height: 200%">
<FeatherDialog v-model="visible" relative :labels="labels">
<p class="my-content">A message from the Relative Dialog</p>
Expand Down Expand Up @@ -39,7 +39,7 @@ export default {
.my-content {
width: 25rem;
}
.relative {
.relative-demo {
width: 37.5rem;
height: 37.5rem;
position: relative;
Expand Down
4 changes: 2 additions & 2 deletions packages/@featherds/dialog/demos/Relative.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
>Open Dialog</feather-button
>
<p>Dialog Is Open: {{ visible }}</p>
<div class="relative">
<div class="relative-demo">
<div style="height: 120vh">
<feather-dialog v-model="visible" :relative="true" :labels="labels">
<p class="my-content">Ich bin zufrieden</p>
Expand Down Expand Up @@ -48,7 +48,7 @@ export default defineComponent({
.my-content {
width: 25rem;
}
.relative {
.relative-demo {
width: 37.5rem;
height: 37.5rem;
position: relative;
Expand Down
12 changes: 2 additions & 10 deletions packages/@featherds/dialog/src/components/FeatherDialog.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Teleport to="body">
<Teleport to="body" :disabled="relative">
<div
class="feather-dialog feather-styles"
:class="{ relative: relative }"
Expand Down Expand Up @@ -67,15 +67,7 @@ import {
useHideRelativeOverflow,
} from "@featherds/composables/modal/HideOverflow";
import { useLabelProperty } from "@featherds/composables/LabelProperty";
import {
computed,
toRef,
ref,
watch,
defineComponent,
PropType,
Ref,
} from "vue";
import { computed, toRef, ref, watch, defineComponent, PropType } from "vue";
const LABELS = {
title: "REQUIRED",
Expand Down

0 comments on commit 05e504c

Please sign in to comment.