-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Slideover): add
prevent-close
prop
- Loading branch information
1 parent
2cc5c0d
commit d15e816
Showing
9 changed files
with
265 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
docs/components/content/examples/SlideoverExampleBasic.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script setup> | ||
const isOpen = ref(false) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<UButton label="Open" @click="isOpen = true" /> | ||
|
||
<USlideover v-model="isOpen"> | ||
<div class="p-4 flex-1"> | ||
<Placeholder class="h-full" /> | ||
</div> | ||
</USlideover> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script setup> | ||
const isOpen = ref(false) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<UButton label="Open" @click="isOpen = true" /> | ||
|
||
<USlideover v-model="isOpen"> | ||
<UCard class="flex flex-col flex-1" :ui="{ body: { base: 'flex-1' }, ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }"> | ||
<template #header> | ||
<Placeholder class="h-8" /> | ||
</template> | ||
|
||
<Placeholder class="h-full" /> | ||
|
||
<template #footer> | ||
<Placeholder class="h-8" /> | ||
</template> | ||
</UCard> | ||
</USlideover> | ||
</div> | ||
</template> |
15 changes: 15 additions & 0 deletions
15
docs/components/content/examples/SlideoverExampleDisableOverlay.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script setup> | ||
const isOpen = ref(false) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<UButton label="Open" @click="isOpen = true" /> | ||
|
||
<USlideover v-model="isOpen" :overlay="false"> | ||
<div class="p-4 flex-1"> | ||
<Placeholder class="h-full" /> | ||
</div> | ||
</USlideover> | ||
</div> | ||
</template> |
15 changes: 15 additions & 0 deletions
15
docs/components/content/examples/SlideoverExampleDisableTransition.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script setup> | ||
const isOpen = ref(false) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<UButton label="Open" @click="isOpen = true" /> | ||
|
||
<USlideover v-model="isOpen" :transition="false"> | ||
<div class="p-4 flex-1"> | ||
<Placeholder class="h-full" /> | ||
</div> | ||
</USlideover> | ||
</div> | ||
</template> |
24 changes: 24 additions & 0 deletions
24
docs/components/content/examples/SlideoverExamplePreventClose.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup> | ||
const isOpen = ref(false) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<UButton label="Open" @click="isOpen = true" /> | ||
|
||
<USlideover v-model="isOpen" prevent-close> | ||
<UCard class="flex flex-col flex-1" :ui="{ body: { base: 'flex-1' }, ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }"> | ||
<template #header> | ||
<div class="flex items-center justify-between"> | ||
<h3 class="text-base font-semibold leading-6 text-gray-900 dark:text-white"> | ||
Slideover | ||
</h3> | ||
<UButton color="gray" variant="ghost" icon="i-heroicons-x-mark-20-solid" class="-my-1" @click="isOpen = false" /> | ||
</div> | ||
</template> | ||
|
||
<Placeholder class="h-full" /> | ||
</UCard> | ||
</USlideover> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters