Skip to content

Commit 8c0b3d7

Browse files
Merge pull request #130 from banqinghe/docs-react-example
Add disable button to react example
2 parents 80bf043 + 5ed1a3a commit 8c0b3d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/src/examples/react/ActualReactApp.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup>
22
import { useAutoAnimate } from "../../../../src/vue/index.ts"
33
import { ref } from "vue"
4-
const [parent] = useAutoAnimate()
4+
const [parent, setEnabled] = useAutoAnimate()
55
const items = ref([0, 1, 2])
66
</script>
77

@@ -13,6 +13,9 @@ const items = ref([0, 1, 2])
1313
<button @click="items.push(items.length)" class="button button--alt">
1414
Add number
1515
</button>
16+
<button @click="setEnabled(false)" class="button button--alt">
17+
Disable
18+
</button>
1619
</div>
1720
</template>
1821

0 commit comments

Comments
 (0)