Skip to content

Commit

Permalink
docs(buttons): clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Mar 22, 2023
1 parent 63886b5 commit 516d3af
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
26 changes: 23 additions & 3 deletions packages/docs/src/examples/v-btn/usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,29 @@
}
})
watch(stacked, val => val && (prepend.value = true, append.value = false, icon.value = false))
watch(prepend, val => val && (icon.value = false))
watch(append, val => val && (icon.value = false))
watch(stacked, val => {
if (val) {
prepend.value = true
append.value = false
icon.value = false
}
})
watch(prepend, val => {
if (val) {
icon.value = false
if (stacked.value) (append.value = false)
}
})
watch(append, val => {
if (val) {
icon.value = false
if (stacked.value) (prepend.value = false)
}
})
watch(icon, val => val && (prepend.value = false, append.value = false, stacked.value = false))
const slots = computed(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/pages/en/components/buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The following code snippet is an example of a basic `v-btn` component only conta

### Props

There are a multitude of props that can be used to customize the `v-btn` appearance and behavior. Props such as **prepend-icon** and **append-icon** are a simple interface for adding positioned icons while props such as **block** and **stacked** are used to control the component's shape.
A wide array of props can be employed to modify the `v-btn` component's look and functionality. Props like **prepend-icon** and **append-icon** offer a straightforward approach to incorporate positioned icons, whereas **block** and **stacked** props are utilized to manage the component's form.

#### Density

Expand Down Expand Up @@ -221,7 +221,7 @@ export default createVuetify({

## Aliasing

Use [aliasing](/features/aliasing/) functionality to create virtual components based off of the `v-btn` component. This is useful when you have multiple button variants as part of a design specification or when creating a custom library based of of Vuetify.
Utilize the [component aliasing](/features/aliasing/) feature to generate virtual components derived from the v-btn component. This proves valuable when dealing with numerous button variations within design specifications or when developing a custom library based on Vuetify.

```js { resource="src/plugins/vuetify.js" }
import { createVuetify } from 'vuetifyjs'
Expand Down

0 comments on commit 516d3af

Please sign in to comment.