-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
178 additions
and
483 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,23 @@ | ||
<script setup lang="ts"> | ||
import { | ||
Collapsible, | ||
CollapsibleContent, | ||
CollapsibleTrigger, | ||
} from "@/components/ui/collapsible" | ||
import { ref } from "vue" | ||
import Button from "./components/ui/button/Button.vue" | ||
const isOpen = ref(false) | ||
</script> | ||
|
||
<template> | ||
<Button>Button</Button> | ||
<Collapsible v-model:open="isOpen"> | ||
<CollapsibleTrigger>Can I use this in my project?</CollapsibleTrigger> | ||
<CollapsibleContent> | ||
Yes. Free to use for personal and commercial projects. No attribution | ||
required. | ||
</CollapsibleContent> | ||
</Collapsible> | ||
</template> |
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
examples/shadcn-vue/src/components/ui/collapsible/Collapsible.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,17 @@ | ||
<script setup lang="ts"> | ||
import { CollapsibleRoot, useEmitAsProps } from "radix-vue" | ||
import type { CollapsibleRootEmits, CollapsibleRootProps } from "radix-vue" | ||
const props = defineProps<CollapsibleRootProps>() | ||
const emits = defineEmits<CollapsibleRootEmits>() | ||
</script> | ||
|
||
<template> | ||
<CollapsibleRoot | ||
v-slot="{ open }" | ||
v-bind="{ ...props, ...useEmitAsProps(emits) }" | ||
> | ||
<slot :open="open" /> | ||
</CollapsibleRoot> | ||
</template> |
16 changes: 16 additions & 0 deletions
16
examples/shadcn-vue/src/components/ui/collapsible/CollapsibleContent.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,16 @@ | ||
<script setup lang="ts"> | ||
import { CollapsibleContent } from "radix-vue" | ||
import type { CollapsibleContentProps } from "radix-vue" | ||
const props = defineProps<CollapsibleContentProps>() | ||
</script> | ||
|
||
<template> | ||
<CollapsibleContent | ||
v-bind="props" | ||
class="overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down" | ||
> | ||
<slot /> | ||
</CollapsibleContent> | ||
</template> |
13 changes: 13 additions & 0 deletions
13
examples/shadcn-vue/src/components/ui/collapsible/CollapsibleTrigger.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,13 @@ | ||
<script setup lang="ts"> | ||
import { CollapsibleTrigger } from "radix-vue" | ||
import type { CollapsibleTriggerProps } from "radix-vue" | ||
const props = defineProps<CollapsibleTriggerProps>() | ||
</script> | ||
|
||
<template> | ||
<CollapsibleTrigger v-bind="props"> | ||
<slot /> | ||
</CollapsibleTrigger> | ||
</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,3 @@ | ||
export { default as Collapsible } from "./Collapsible.vue" | ||
export { default as CollapsibleTrigger } from "./CollapsibleTrigger.vue" | ||
export { default as CollapsibleContent } from "./CollapsibleContent.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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.