From 372329c13da2f0ee5f1a87d592c495ef43f92e00 Mon Sep 17 00:00:00 2001 From: upsiflu Date: Fri, 10 Jan 2025 01:22:17 +0100 Subject: [PATCH] chore(ui-docs): minor additions --- front/ui-docs/components/ui/layout/section.md | 40 +++++++++------ front/ui-docs/components/ui/layout/spacer.md | 51 +++++++++---------- front/ui-docs/components/ui/link.md | 33 ++++++------ 3 files changed, 66 insertions(+), 58 deletions(-) diff --git a/front/ui-docs/components/ui/layout/section.md b/front/ui-docs/components/ui/layout/section.md index a0462835b..e91ae06d8 100644 --- a/front/ui-docs/components/ui/layout/section.md +++ b/front/ui-docs/components/ui/layout/section.md @@ -101,6 +101,10 @@ const user: User = { } +```ts +import Section from "~/components/ui/Section.vue" +``` + # Layout section Sections divide the page vertically. Choose an appropriate heading level for each section: `h1` or `h2` or `h3`. @@ -112,7 +116,7 @@ Sections divide the page vertically. Choose an appropriate heading level for eac ### Align the section to the page ```vue-html -
+
``` ### Make the section header align with the section contents @@ -132,14 +136,16 @@ The link or button will be shown on the right side of the header. ```vue-html -
+
-
+
``` + -
@@ -148,33 +154,35 @@ You can add props to the Link or Button, for example to make them `primary` or a ```vue-html{1}
+ h3="Example" :action="{ text:'Say hello!', onClick:()=>console.log('Hello') }" /> ```
+ h3="Example" :action="{ text:'Say hello!', onClick:()=>console.log('Hello') }" /> ::: tip Gaps between consecutive sections -Place consecutive sections into a `` to space them out. -You can add spacers (negatice or positive) if you want to manually make one distance smaller or larger. +Place consecutive sections into a [Layout stack](../layout) width a size of 64px give them a regular vertical rhythm. Use different sizes for very small or very large headings. +You can add spacers with negative or positive size if you want to manually make a specific distance smaller or larger than the others. ```vue-html -
-
+
+
``` - -
-
+ +
+
+ + ::: ::: tip Let items cover the whole grid width @@ -223,13 +231,13 @@ To prevent items from being put on a grid, add `style="grid-column: 1 / -1"` whi - - --- + + -
+
Artist Name diff --git a/front/ui-docs/components/ui/layout/spacer.md b/front/ui-docs/components/ui/layout/spacer.md index e07eed563..23ac5c44c 100644 --- a/front/ui-docs/components/ui/layout/spacer.md +++ b/front/ui-docs/components/ui/layout/spacer.md @@ -18,7 +18,7 @@ const size = ref(32) ```ts -import Spacer from "~/components/ui/Spacer.vue" +import Spacer from "~/components/ui/Spacer.vue"; ``` # Spacer @@ -97,7 +97,7 @@ const size = ref(1); A - + B ``` @@ -108,51 +108,50 @@ const size = ref(1);
A - + B
+Note the `+` before `size`. Some browsers will output a string for the `Input` value, and the JavaScript `+` prefix parses it into a number. Spacers need numeric `size` values because positive size values affect the dimensions of the element while negative sizes cause negative margins. + ## Make the Spacer elastic (responsive) -```vue-html - - +
- - A - - B - C - - D - - E - +```vue-html + + + + + + + + + ``` +
+
- A + - B - C + + - D + - E + diff --git a/front/ui-docs/components/ui/link.md b/front/ui-docs/components/ui/link.md index fcb6b905d..68c595ba0 100644 --- a/front/ui-docs/components/ui/link.md +++ b/front/ui-docs/components/ui/link.md @@ -9,6 +9,7 @@ import Alert from '~/components/ui/Alert.vue' ```ts import Link from "~/components/ui/Link.vue" ``` + # Link Users can navigate by following Links. They expect that in contrast to clicking a [button](button), following a link does not manipulate items or trigger any action. @@ -122,26 +123,26 @@ _Only use on top of solid surfaces, else the text may be unreadable!_ ## Set width and alignment -See [Using width](/using-width) and [Using alignment](/using-alignment) +See [Using width](/using-width) and [Using alignment](/using-alignment). ```vue-html - min-content - tiny - buttonWidth - small - medium - full - auto -
- ๐ŸŒ - ๐ŸŒ - ๐ŸŒ -
- ๐ŸŒ - ๐ŸŒ - ๐ŸŒ + min-content + tiny + buttonWidth + small + medium + full + auto +
+ ๐ŸŒ + ๐ŸŒ + ๐ŸŒ +
+ ๐ŸŒ + ๐ŸŒ + ๐ŸŒ ```