Skip to content
This repository was archived by the owner on Jan 9, 2022. It is now read-only.

Commit 9ef3fe8

Browse files
committed
feat(docs): upgrade docs
1 parent 6c90c22 commit 9ef3fe8

File tree

2 files changed

+161
-13
lines changed

2 files changed

+161
-13
lines changed

Diff for: docs/src/docs/components/g-dialog.md

+156-11
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,116 @@ z-index of the component is 200. So be careful. Don't make z-index of the header
1010

1111
## Props
1212

13-
| Name | Type | Default | Description |
14-
|:---|:---|:---|:---|
15-
| content-class | `string` | `''` | Applies to the div that wraps the main slot |
16-
| depressed | `boolean` | `false` | Disables default box-shadow |
17-
| height | `string`, `number` | `'auto'` | Sets height for the dialog |
18-
| max-width | `string,` `number` | `'none'` | Sets max-width for the dialog |
19-
| model-value | `boolean` | `false` | v-model props to activate and deactivate the dialog |
20-
| persistent | `boolean` | `false` | Makes clicking outside of the element will not deactivate the dialog |
21-
| scrollable | `boolean` | `false` | |
22-
| width | `string,` `number` | `'auto'` | Sets width for the dialog |
13+
| Name | Type | Default |
14+
|:---|:---|:---|
15+
| [background](#background) | `boolean` `string` | `true` |
16+
| [border-radius](#border-radius) | `boolean` `number` `string` | `true` |
17+
| [content-class](#content-class) | `string` | `''` |
18+
| [depressed](#depressed) | `boolean` | `false` |
19+
| [height](#height) | `string` `number` | `'auto'` |
20+
| [max-width](#max-width) | `string` `number` | `'none'` |
21+
| [model-value](#model-value) | `boolean` | `false` |
22+
| [persistent](#persistent) | `boolean` | `false` |
23+
| [scrollable](#scrollable) | `boolean` | `false` |
24+
| [width](#width) | `string` `number` | `'auto'` |
25+
26+
27+
### `background`
28+
- **Type:** `Boolean | String`
29+
30+
- **Default:** `true`
31+
32+
- **Details:** <br/>
33+
Sets background to the dialog content
34+
35+
---
36+
37+
### `border-radius`
38+
- **Type:** `Boolean | Number | String`
39+
40+
- **Default:** `true`
41+
42+
- **Details:** <br/>
43+
Sets border-radius to the dialog content
44+
45+
---
46+
47+
### `content-class`
48+
- **Type:** `String`
49+
50+
- **Details:** <br/>
51+
Applies the class to the content (div that wraps the main slot)
52+
53+
---
54+
55+
56+
### `depressed`
57+
- **Type:** `Boolean`
58+
59+
- **Default:** `false`
60+
61+
- **Details:** <br/>
62+
Disables default box-shadow
63+
64+
---
65+
66+
### `height`
67+
- **Type:** `String | Number`
68+
69+
- **Default:** `'auto'`
70+
71+
- **Details:** <br/>
72+
Sets height for the dialog
73+
74+
---
75+
76+
### `max-width`
77+
- **Type:** `String | Number`
78+
79+
- **Default:** `'none'`
80+
81+
- **Details:** <br/>
82+
Sets max-width for the dialog
83+
84+
---
85+
86+
### `model-value`
87+
- **Type:** `Boolean`
88+
89+
- **Default:** `false`
90+
91+
- **Details:** <br/>
92+
v-model props to activate and deactivate the dialog
93+
94+
---
95+
96+
### `persistent`
97+
- **Type:** `Boolean`
98+
99+
- **Default:** `false`
100+
101+
- **Details:** <br/>
102+
Makes clicking outside of the element will not deactivate the dialog
103+
104+
---
105+
106+
### `scrollable`
107+
- **Type:** `Boolean`
108+
109+
- **Default:** `false`
110+
111+
<!-- - **Details:** <br/> -->
112+
113+
---
114+
### `width`
115+
- **Type:** `String | Number`
116+
117+
- **Default:** `'auto'`
118+
119+
- **Details:** <br/>
120+
Sets width for the dialog
121+
122+
---
23123

24124
## Slots
25125

@@ -32,4 +132,49 @@ z-index of the component is 200. So be careful. Don't make z-index of the header
32132

33133
| Name | Payload | Description |
34134
|:---|:---|:---|
35-
| `update:modelValue` | `boolean` | runs with `false` after clicking outside
135+
| `update:modelValue` | `boolean` | runs with `false` after clicking outside
136+
137+
## CSS Vars Customization
138+
139+
To change some styling (background, border-radius) for single dialog, you can pass props.
140+
Or use CSS variables to do it globally. Put the vars into your global css file or into App.vue `<style>`
141+
142+
```css
143+
:root {
144+
--g-dialog-content-bg: #eff1f3;
145+
--g-dialog-content-border-radius: 8px;
146+
}
147+
```
148+
149+
**List of possible variables:**
150+
151+
### content-bg
152+
- **Name:** `--g-dialog-content-bg`
153+
154+
- **Default:** `#fff`
155+
156+
- **Details:** <br/>
157+
Sets default `background` for the dialog content
158+
159+
- **Usage:**
160+
161+
```css
162+
--g-dialog-content-bg: #282c34;
163+
```
164+
165+
---
166+
167+
### content-border-radius
168+
- **Name:** `--g-dialog-border-radius`
169+
170+
- **Default:** `4px`
171+
172+
- **Details:**<br/>
173+
Sets default `border-radius` for the dialog content
174+
175+
- **Usage:**
176+
177+
```css
178+
--g-dialog-border-radius: 0;
179+
```
180+
---

Diff for: docs/src/docs/guide/plugin-usage.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ export default {
104104
To close the dialog (DialogComponent.vue) you need inside emit the event `update:modelValue` with `false` inside. Take a look at the [example](#example) below
105105
:::
106106

107-
108-
107+
---
109108

110109
### `removeDialog(index)`
111110

@@ -117,6 +116,8 @@ export default {
117116
- **Details:** <br/>
118117
The method removes item from [dialogs](#dialogs) by index. Useful if you decide to write your own [GDialogRoot](/docs/components/g-dialog-root)
119118

119+
---
120+
120121
### `dialogs`
121122
- **Type:** `Array`
122123

@@ -134,6 +135,8 @@ export default {
134135
}
135136
```
136137

138+
---
139+
137140
## Example
138141

139142
First create your Dialog component that will be launched from method. Name it InfoDialog.vue

0 commit comments

Comments
 (0)