Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit d259aab

Browse files
committed
feat(BOffcanvas): change teleport properties.
BREAKING CHANGE: change properties strict to teleportDisabled and to to teleportTo.
1 parent 42c9a86 commit d259aab

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/bootstrap-vue-next/src/components/BOffcanvas/BOffcanvas.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<teleport :to="props.to" :disabled="staticBoolean">
2+
<teleport :to="props.teleportTo" :disabled="teleportDisabledBoolean">
33
<b-transition
44
:no-fade="true"
55
:trans-props="{
@@ -93,9 +93,9 @@ interface BOffcanvasProps {
9393
lazy?: Booleanish
9494
id?: string
9595
noFocus?: Booleanish
96-
static?: Booleanish
9796
backdropVariant?: ColorVariant | null
98-
to?: string | RendererElement | null | undefined
97+
teleportDisabled?: Booleanish
98+
teleportTo?: string | RendererElement | null | undefined
9999
// TODO responsive doesn't work
100100
// responsive?: Breakpoint
101101
}
@@ -105,7 +105,6 @@ const props = withDefaults(defineProps<BOffcanvasProps>(), {
105105
id: undefined,
106106
title: undefined,
107107
modelValue: false,
108-
static: false,
109108
backdropVariant: 'dark',
110109
noFocus: false,
111110
bodyScrolling: false,
@@ -116,7 +115,8 @@ const props = withDefaults(defineProps<BOffcanvasProps>(), {
116115
placement: 'start',
117116
noHeaderClose: false,
118117
noHeader: false,
119-
to: 'body',
118+
teleportDisabled: false,
119+
teleportTo: 'body',
120120
})
121121
122122
interface BOffcanvasEmits {
@@ -167,7 +167,7 @@ const noFocusBoolean = useBooleanish(() => props.noFocus)
167167
const noCloseOnBackdropBoolean = useBooleanish(() => props.noCloseOnBackdrop)
168168
const noCloseOnEscBoolean = useBooleanish(() => props.noCloseOnEsc)
169169
const lazyBoolean = useBooleanish(() => props.lazy)
170-
const staticBoolean = useBooleanish(() => props.static)
170+
const teleportDisabledBoolean = useBooleanish(() => props.teleportDisabled)
171171
172172
const computedId = useId(() => props.id, 'offcanvas')
173173

packages/bootstrap-vue-next/src/components/BOffcanvas/offcanvas.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ describe.skip('offcanvas', () => {
1919
if (el) document.body.removeChild(el)
2020
})
2121

22-
it('has body teleports element set by to property', () => {
22+
it('has body teleports element set by teleportTo property', () => {
2323
const wrapper = mount(BOffcanvas, {
2424
props: {
25-
to: '#body-teleports',
25+
teleportTo: '#body-teleports',
2626
modelValue: true,
2727
},
2828
})

0 commit comments

Comments
 (0)