diff --git a/front/ui-docs/components/ui/button.md b/front/ui-docs/components/ui/button.md index 664c64a58..9768e5991 100644 --- a/front/ui-docs/components/ui/button.md +++ b/front/ui-docs/components/ui/button.md @@ -38,7 +38,7 @@ Buttons are UI elements that users can interact with to perform actions and mani ## Action -[The default action of buttons is `submit` \[mdn\]](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type). Specify an `onClick` function to change the behavior of a button. +[The default action of buttons is `submit` \[mdn\]](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type). Specify an [`onClick` or `@click`](#short-form-click) function to change the behavior of a button. ```vue-html
@@ -52,6 +52,18 @@ Buttons are UI elements that users can interact with to perform actions and mani
+### Short-form @click + +For convenience, you can use the Vue-specific `@click` syntax to add the `onClick` prop. The following two buttons are effectively equal: + +```vue-html + + +``` + + + + ## Button colors Buttons come in different types depending on the type of action they represent. @@ -60,6 +72,8 @@ Find [a complete overview of recommended styles on the color page](../../using-c ### Default +Default buttons represent **neutral** actions such as cancelling a change or dismissing a notification. +
diff --git a/front/ui-docs/components/ui/layout.md b/front/ui-docs/components/ui/layout.md index 489e1f5da..eeebbc0d1 100644 --- a/front/ui-docs/components/ui/layout.md +++ b/front/ui-docs/components/ui/layout.md @@ -21,11 +21,13 @@ import Layout from "~/components/ui/Layout.vue" CSS provides [four methods to arrange items in a container](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Relationship_of_grid_layout_with_other_layout_methods): Flow, Columns, Flex and Grid. To make typical alignment tasks in the Funkwhale Ui easier, we have created a few useful presets. +By default, the items have a 32px gap. You can [change it with the `gap-x` prop](#gap-x-set-the-gap-to-one-of-the-defaults). + ## Apply presets The following containers are responsive. Change your window's size or select a device preset from your browser's dev tools to see how layouts are affected by available space. - +