Skip to content

Commit 149a0ea

Browse files
committed
docs(transition): fix duplicate transition name
1 parent 673317c commit 149a0ea

File tree

3 files changed

+29
-30
lines changed

3 files changed

+29
-30
lines changed
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
<template>
22
<v-container>
3-
<v-row justify="center">
3+
<v-row justify="center" style="min-height: 160px;">
44
<v-col class="text-center">
55
<v-btn
66
color="primary"
77
@click="show = !show"
88
>
9-
My Transition
9+
Component Transition
1010
</v-btn>
1111

12-
<MyTransition>
12+
<ComponentTransition>
1313
<v-card
1414
v-show="show"
15-
width="100"
16-
height="100"
17-
color="secondary"
1815
class="mx-auto mt-5"
16+
color="secondary"
17+
height="100"
18+
width="100"
1919
></v-card>
20-
</MyTransition>
20+
</ComponentTransition>
2121
</v-col>
2222
</v-row>
2323
</v-container>
2424
</template>
2525

2626
<script setup>
27-
import { ref } from 'vue'
28-
import { createCssTransition } from 'vuetify/components/transitions';
27+
import { ref } from 'vue'
28+
import { createCssTransition } from 'vuetify/components/transitions'
2929
30-
const MyTransition = createCssTransition('my-transition')
30+
const ComponentTransition = createCssTransition('component-transition')
3131
32-
const show = ref(false)
32+
const show = ref(false)
3333
</script>
3434

3535
<style lang="scss">
36-
.my-transition {
37-
&-enter-active,
38-
&-leave-active {
39-
transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
40-
}
36+
.component-transition {
37+
&-enter-active,
38+
&-leave-active {
39+
transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
40+
}
4141
42-
&-enter-from,
43-
&-leave-to {
44-
opacity: 0;
45-
transform: rotate(180deg) scale(0.2) skew(20deg);
46-
filter: hue-rotate(90deg);
42+
&-enter-from,
43+
&-leave-to {
44+
opacity: 0;
45+
transform: rotate(180deg) scale(0.2) skew(20deg);
46+
filter: hue-rotate(90deg);
47+
}
4748
}
48-
}
4949
</style>

packages/docs/src/examples/transitions/create-css-transition-prop.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<v-container>
33
<v-row justify="center">
44
<v-col class="text-center">
5-
<v-menu transition="my-transition">
5+
<v-menu transition="custom-prop-transition">
66
<template v-slot:activator="{ props }">
77
<v-btn
88
color="primary"
@@ -29,14 +29,13 @@
2929
</template>
3030

3131
<script setup>
32-
import { ref } from 'vue'
33-
import { createCssTransition } from 'vuetify/components/transitions';
32+
import { createCssTransition } from 'vuetify/components/transitions'
3433
35-
const MyTransition = createCssTransition('my-transition')
34+
createCssTransition('custom-prop-transition')
3635
</script>
3736

3837
<style lang="scss">
39-
.my-transition {
38+
.custom-prop-transition {
4039
&-enter-active,
4140
&-leave-active {
4241
transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);

packages/docs/src/pages/en/styles/transitions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ You can use Vuetify's transition helper function to easily create your own custo
115115
```js
116116
import { createCssTransition } from 'vuetify/components/transitions';
117117

118-
const MyTransition = createCssTransition('my-transition')
118+
createCssTransition('my-transition')
119119
```
120120

121121
The argument passed to the **createCssTransition** function will be the name of the transition that you can hook into your style. This is an example of what `my-transition` looks like:
@@ -137,13 +137,13 @@ The argument passed to the **createCssTransition** function will be the name of
137137

138138
You can now use this custom transition in a few different ways.
139139

140-
#### As a component
140+
### As a component
141141

142142
The **createCssTransition** function will return a component that you can use in your template.
143143

144144
<ExamplesExample file="transitions/create-css-transition-component" />
145145

146-
#### As a prop
146+
### As a prop
147147

148148
Many of Vuetify’s components contain a **transition** prop. You can send the name of your custom transition to the transition prop.
149149

0 commit comments

Comments
 (0)