Skip to content

Commit 8183260

Browse files
committed
feat(docs): Polish sections in multiple pages
1 parent 2c0be0e commit 8183260

File tree

18 files changed

+207
-49
lines changed

18 files changed

+207
-49
lines changed

docs/src/components/DocInstallation.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default {
6767
6868
;['components', 'directives'].forEach(type => {
6969
if (this[type] !== void 0) {
70-
parts.push(`// not needed if using auto-import feature:
70+
parts.push(`// NOT needed if using auto-import feature:
7171
${type}: [
7272
${this.nameAsString(this[type], 6)}
7373
]`)

docs/src/examples/QVideo/Basic.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="q-pa-md q-gutter-md">
2+
<div class="q-pa-md">
33
<q-video
44
src="https://www.youtube.com/embed/k3_tw44QsZQ?rel=0"
55
/>
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
2-
<div class="q-pa-md q-gutter-md">
3-
<div class="q-video">
4-
<iframe
5-
src="https://www.youtube.com/embed/k3_tw44QsZQ?rel=0"
6-
frameborder="0"
7-
allowfullscreen
8-
/>
9-
</div>
2+
<div class="q-pa-md">
3+
<div class="q-video">
4+
<iframe
5+
src="https://www.youtube.com/embed/k3_tw44QsZQ?rel=0"
6+
frameborder="0"
7+
allowfullscreen
8+
/>
9+
</div>
1010
</div>
1111
</template>

docs/src/pages/vue-components/checkbox.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,56 @@ Please also refer to the [QOptionGroup](/vue-components/option-group) on other p
1919
<doc-installation components="QCheckbox" />
2020

2121
## Usage
22+
23+
### Standard
24+
2225
<doc-example title="Standard" file="QCheckbox/Standard" />
2326

27+
### Label
28+
2429
<doc-example title="Label" file="QCheckbox/Label" />
2530

31+
### Coloring
32+
2633
In the second row in the example below, the property `keep-color` is being used to retain the passed in color when the checkbox is not in a toggled state.
2734

2835
<doc-example title="Coloring" file="QCheckbox/Coloring" />
2936

37+
### Dense and dark
38+
3039
<doc-example title="Dense" file="QCheckbox/Dense" />
3140

3241
<doc-example title="On a dark background" file="QCheckbox/OnDarkBackground" dark />
3342

43+
### Indeterminate state
44+
3445
In the example below, as soon as you click on the first checkbox it starts toggling between true/false. The second checkbox, on the other hand toggles between the three states (indeterminate/true/false) with help from `toggle-indeterminate`. You can optionally set the property `indeterminate-value`, otherwise the indeterminate value will be considered `null`.
3546

3647
<doc-example title="Indeterminate state" file="QCheckbox/IndeterminateState" />
3748

49+
### Array model
50+
3851
<doc-example title="Array as model" file="QCheckbox/ArrayAsModel" />
3952

53+
### Custom model values
54+
4055
<doc-example title="Custom model values" file="QCheckbox/CustomModel" />
4156

57+
### With QOptionGroup
58+
4259
::: tip
4360
You can also use [QOptionGroup](/vue-components/option-group), which simplifies the usage when you have groups of checkboxes, like in example below.
4461
:::
4562

4663
<doc-example title="Usage with QOptionGroup" file="QCheckbox/OptionGroup" />
4764

65+
### With QItem
66+
4867
In the example below, we are rendering a `<label>` tag (notice `tag="label"`) so the QCheckbox will respond to clicks on QItems to change toggle state.
4968

50-
<doc-example title="In a list" file="QCheckbox/InaList" />
69+
<doc-example title="With QItem" file="QCheckbox/InaList" />
70+
71+
### Disable
5172

5273
<doc-example title="Disable" file="QCheckbox/Disable" />
5374

docs/src/pages/vue-components/expansion-item.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ They are basically [QItem](/vue-components/list-and-list-items) components wrapp
1616

1717
## Usage
1818

19+
### Basic
20+
1921
<doc-example title="Basic" file="QExpansionItem/Basic" />
2022

23+
### Controlling expansion state
24+
2125
<doc-example title="Controlling expansion state" file="QExpansionItem/ControlExpansionState" />
2226

2327
### Style

docs/src/pages/vue-components/no-ssr.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,43 @@ Alternatively, you can also use it to render content only on server-side and it
1414
<doc-installation components="QNoSsr" />
1515

1616
## Usage
17-
Basic:
17+
18+
### Basic
19+
1820
```html
1921
<q-no-ssr>
2022
<div>This won't be rendered on server</div>
2123
</q-no-ssr>
2224
```
2325

24-
Multiple client nodes:
26+
### Multiple client nodes
27+
2528
```html
2629
<q-no-ssr>
2730
<div>This won't be rendered on server.</div>
2831
<div>This won't either.</div>
2932
</q-no-ssr>
3033
```
3134

32-
Multiple client nodes with tag prop:
35+
### Multiple client nodes with tag prop
36+
3337
```html
3438
<q-no-ssr tag="blockquote">
3539
<div>This won't be rendered on server.</div>
3640
<div>This won't either.</div>
3741
</q-no-ssr>
3842
```
3943

40-
Placeholder property:
44+
### Placeholder property
45+
4146
```html
4247
<q-no-ssr placeholder="Rendered on server">
4348
<div>This won't be rendered on server</div>
4449
</q-no-ssr>
4550
```
4651

47-
Placeholder slot:
52+
### Placeholder slot
53+
4854
```html
4955
<q-no-ssr>
5056
<div>This won't be rendered on server</div>
@@ -54,7 +60,8 @@ Placeholder slot:
5460
</q-no-ssr>
5561
```
5662

57-
Multiple content in placeholder slot:
63+
### Multiple content in placeholder slot
64+
5865
```html
5966
<q-no-ssr>
6067
<div>This won't be rendered on server</div>
@@ -65,7 +72,8 @@ Multiple content in placeholder slot:
6572
</q-no-ssr>
6673
```
6774

68-
Only placeholder slot:
75+
### Only placeholder slot
76+
6977
```html
7078
<q-no-ssr>
7179
<template v-slot:placeholder>

docs/src/pages/vue-components/option-group.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,39 @@ The QOptionGroup component is a helper component that allows you better control
1414
<doc-installation components="QOptionGroup" />
1515

1616
## Usage
17+
18+
### Standard
19+
1720
<doc-example title="Standard" file="QOptionGroup/Standard" />
1821

22+
### With QCheckbox or QToggle
23+
1924
<doc-example title="With checkboxes" file="QOptionGroup/Checkbox" />
2025

2126
::: warning
22-
The model for checkboxes must be an array
27+
The model for checkboxes/toggles must be an array.
2328
:::
2429

2530
<doc-example title="With toggles" file="QOptionGroup/Toggle" />
2631

27-
::: warning
28-
The model for toggles must be an array
29-
:::
32+
### With labels on left side
3033

3134
<doc-example title="With option labels on the left side" file="QOptionGroup/Label" />
3235

36+
### Inline
37+
3338
<doc-example title="Inline" file="QOptionGroup/Inline" />
3439

40+
### Dense
41+
3542
<doc-example title="Dense and inline" file="QOptionGroup/DenseInline" />
3643

44+
### Disable
45+
3746
<doc-example title="Disabled" file="QOptionGroup/Disable" />
3847

48+
### Dark
49+
3950
<doc-example title="On a dark background" file="QOptionGroup/Dark" dark />
4051

4152
## QOptionGroup API

docs/src/pages/vue-components/popup-proxy.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ QPopupProxy should be used when you need either a [QMenu](/vue-components/menu)
1717
Use your browsers development tools to toggle the device between mobile or desktop (with browser refresh after each change) or, physically resize your browser's window to watch the QPopupProxy component switch between either a QMenu or a QDialog before clicking/tapping on its container. The default breakpoint is set at 450px.
1818
:::
1919

20+
### Standard
21+
2022
<doc-example title="Standard" file="QPopupProxy/Standard" />
2123

24+
### Context menu
25+
2226
<doc-example title="Context menu (right click / long tap)" file="QPopupProxy/ContextMenu" />
2327

28+
### Breakpoint
29+
2430
On the example below, click on the icon in the input.
2531

2632
<doc-example title="Breakpoint @600px" file="QPopupProxy/Breakpoint" />

docs/src/pages/vue-components/pull-to-refresh.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ To refresh, pull down (with mouse or through finger touch) on the content below
2323

2424
<doc-example title="Custom icon" file="QPullToRefresh/Icon" />
2525

26-
### Tips
26+
::: tip TIPS
2727
* If using a QLayout, then it's recommended that you put QPullToRefresh as direct child of QPage and wrap your page content with it.
2828
* If you change the parent of this component, don't forget to call `updateScrollTarget()` on the QPullToRefresh Vue reference.
29+
:::
2930

3031
## QPullToRefresh API
3132
<doc-api file="QPullToRefresh" />

docs/src/pages/vue-components/radio.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,44 @@ Please also refer to the [QOptionGroup](/vue-components/option-group) on other p
1818
<doc-installation components="QRadio" />
1919

2020
## Usage
21+
22+
### Standard
23+
2124
<doc-example title="Standard" file="QRadio/Standard" />
2225

26+
### Dense
27+
2328
<doc-example title="Dense" file="QRadio/Dense" />
2429

30+
### Coloring
31+
2532
In the second row in the example below, the property `keep-color` is being used to retain the passed in color when the radio button is not in a toggled state.
2633

2734
<doc-example title="Coloring" file="QRadio/Coloring" />
2835

36+
### Dark and disable
37+
2938
<doc-example title="On a dark background" file="QRadio/OnDarkBackground" dark />
3039

40+
<doc-example title="Disable" file="QRadio/Disable" />
41+
42+
### Label on left-side
43+
3144
<doc-example title="Label on left side" file="QRadio/LabelPosition" />
3245

46+
### With QOptionGroup
47+
3348
::: tip
3449
You can also use [QOptionGroup](/vue-components/option-group), which simplifies the usage when you have groups of radios, like in example below.
3550
:::
3651

3752
<doc-example title="Usage with QOptionGroup" file="QRadio/OptionGroup" />
3853

39-
In the example below, we are rendering a `<label>` tag (notice `tag="label"`) so the QRadio will respond to clicks on QItems to change toggle state.
54+
### With QItem
4055

41-
<doc-example title="In a list" file="QRadio/InaList" />
56+
In the example below, we are rendering a `<label>` tag (notice `tag="label"`) so the QRadio will respond to clicks on QItems to change toggle state.
4257

43-
<doc-example title="Disable" file="QRadio/Disable" />
58+
<doc-example title="With QItem" file="QRadio/InaList" />
4459

4560
## QRadio API
4661
<doc-api file="QRadio" />

0 commit comments

Comments
 (0)