Skip to content

Commit e52a1a8

Browse files
committed
feat: add outer borders;
docs: clean up README formatting; chore: bump version
1 parent e3e67a9 commit e52a1a8

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,20 @@ const close = () => {
7676

7777
```vue
7878
<script setup lang="ts">
79-
import { ref } from "vue";
80-
81-
import BottomSheet from "@douxcode/vue-spring-bottom-sheet";
82-
import "@douxcode/vue-spring-bottom-sheet/dist/style.css";
79+
import { ref } from 'vue'
8380
84-
const sheet = ref(false);
81+
import BottomSheet from '@douxcode/vue-spring-bottom-sheet'
82+
import '@douxcode/vue-spring-bottom-sheet/dist/style.css'
8583
84+
const sheet = ref(false)
8685
</script>
8786
8887
<template>
89-
<button type="button" @click="sheet = true"> Open bottom sheet </button>
88+
<button type="button" @click="sheet = true">Open bottom sheet</button>
9089
<BottomSheet v-model="sheet"> Your content </BottomSheet>
9190
</template>
9291
```
9392

94-
9593
## Usage in Nuxt 3
9694

9795
For Nuxt 3, just wrap component in `<ClientOnly>`
@@ -123,6 +121,7 @@ For Nuxt 3, just wrap component in `<ClientOnly>`
123121
--vsbs-shadow-color: rgba(89, 89, 89, 0.2);
124122
--vsbs-background: #fff;
125123
--vsbs-border-radius: 16px;
124+
--vsbs-outer-border-color: transparent;
126125
--vsbs-max-width: 640px;
127126
--vsbs-border-color: rgba(46, 59, 66, 0.125);
128127
--vsbs-padding-x: 16px;
@@ -155,13 +154,13 @@ Assuming there is `const bottomSheet = ref()`
155154

156155
## Events
157156

158-
| Event | Description | Payload |
159-
| -------------- | -------------------------------------- | --------------- |
160-
| opened | Emitted when sheet finishes opening | - |
161-
| closed | Emitted when sheet finishes closing | - |
162-
| dragging-up | Emitted when user drags sheet upward | - |
163-
| dragging-down | Emitted when user drags sheet downward | - |
164-
| instinctHeight | Emitted when content height changes | height (number) |
157+
| Event | Description | Payload |
158+
| -------------- | -------------------------------------- | ----------------------- |
159+
| opened | Emitted when sheet finishes opening | - |
160+
| closed | Emitted when sheet finishes closing | - |
161+
| dragging-up | Emitted when user drags sheet upward | - |
162+
| dragging-down | Emitted when user drags sheet downward | - |
163+
| instinctHeight | Emitted when content height changes | height (number) |
165164
| snapped | Emitted when sheet finishes snapping | snapPointIndex (number) |
166165

167166
## Acknowledgments

packages/vue-spring-bottom-sheet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"url": "https://github.com/megaarmos/vue-spring-bottom-sheet/issues"
3333
},
3434
"private": false,
35-
"version": "2.1.1",
35+
"version": "2.1.2",
3636
"type": "module",
3737
"exports": {
3838
".": {

packages/vue-spring-bottom-sheet/src/BottomSheet.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,10 @@ defineExpose({ open, close, snapToPoint })
616616
background-color: var(--vsbs-background, #fff);
617617
border-top-left-radius: var(--vsbs-border-radius, 16px);
618618
border-top-right-radius: var(--vsbs-border-radius, 16px);
619+
620+
border-right: 1px solid var(--vsbs-outer-border-color, transparent);
621+
border-left: 1px solid var(--vsbs-outer-border-color, transparent);
622+
619623
bottom: 0;
620624
display: flex;
621625
flex-direction: column;
@@ -642,6 +646,11 @@ defineExpose({ open, close, snapToPoint })
642646
padding: 20px var(--vsbs-padding-x, 16px) 8px;
643647
user-select: none;
644648
z-index: 3;
649+
650+
border-top-left-radius: var(--vsbs-border-radius, 16px);
651+
border-top-right-radius: var(--vsbs-border-radius, 16px);
652+
653+
border-top: 1px solid var(--vsbs-outer-border-color, transparent);
645654
}
646655
647656
[data-vsbs-header]:before {

0 commit comments

Comments
 (0)