Skip to content

Commit 384d5d1

Browse files
committed
fix: defaultBreakpoint renamed to defaultSnapPoint;
1 parent a82e3a5 commit 384d5d1

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ For Nuxt 3, just wrap component in `<ClientOnly>`
9595

9696
### Prop Definitions
9797

98-
| Prop | Type | Description | Example |
99-
| ------------------- | -------- | ----------------------------------------------------------------------------- | -------------------------------- |
100-
| snapPoints | Number[] | Defines custom snapping positions for the bottom sheet | `:snapPoints="[300, 600, 900]"` |
101-
| defaultSnapPoint | Number | Specifies the default snap point | `:default-snap-point="600"` |
102-
| blocking | Boolean | Controls whether the bottom sheet blocks interactions with underlying content | `:blocking="true"` |
103-
| canSwipeClose | Boolean | Enables or disables swipe gestures for closing the sheet | `:can-swipe-close="true"` |
104-
| canOverlayClose | Boolean | Allows tapping the overlay to close the sheet | `:can-overlay-close="true"` |
105-
| expandOnContentDrag | Boolean | Enables expanding the sheet by dragging its content | `:expand-on-content-drag="true"` |
98+
| Prop | Type | Description | Example |
99+
| ------------------- | -------- | --------------------------------------------------------------------------------------------------- | -------------------------------- |
100+
| snapPoints | Number[] | Defines custom snapping positions for the bottom sheet | `:snapPoints="[300, 600, 900]"` |
101+
| defaultSnapPoint | Number | Specifies the default snap point. Note that at least one snapPoint must be specified for it to work | `:default-snap-point="600"` |
102+
| blocking | Boolean | Controls whether the bottom sheet blocks interactions with underlying content | `:blocking="true"` |
103+
| canSwipeClose | Boolean | Enables or disables swipe gestures for closing the sheet | `:can-swipe-close="true"` |
104+
| canOverlayClose | Boolean | Allows tapping the overlay to close the sheet | `:can-overlay-close="true"` |
105+
| expandOnContentDrag | Boolean | Enables expanding the sheet by dragging its content | `:expand-on-content-drag="true"` |
106106

107107
### Default Values
108108

src/BottomSheet.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { useSnapPoints } from './composables/useSnapPoints.ts'
1212
interface IProps {
1313
duration?: number
1414
snapPoints?: number[]
15-
defaultBreakpoint?: number
15+
defaultSnapPoint?: number
1616
blocking?: boolean
1717
canSwipeClose?: boolean
1818
canBackdropClose?: boolean
@@ -105,7 +105,7 @@ const handleEscapeKey = (e: KeyboardEvent) => {
105105
const open = () => {
106106
if (!sheet.value) return
107107
108-
height.value = Math.min(props.defaultBreakpoint ?? minSnap.value, windowHeight.value)
108+
height.value = Math.min(props.defaultSnapPoint ?? minSnap.value, windowHeight.value)
109109
110110
set({
111111
height: height.value,
@@ -400,7 +400,7 @@ onMounted(() => {
400400
emit('minHeight', minHeightComputed.value)
401401
emit('maxHeight', windowHeight.value)
402402
403-
height.value = props.defaultBreakpoint ?? Number(minHeightComputed.value)
403+
height.value = props.defaultSnapPoint ?? Number(minHeightComputed.value)
404404
405405
set({
406406
height: height.value,

0 commit comments

Comments
 (0)