Skip to content

Commit dc1b664

Browse files
authored
docs: move dialog style variant to styling page, add props (#4861)
1 parent dc46af9 commit dc1b664

File tree

2 files changed

+105
-34
lines changed

2 files changed

+105
-34
lines changed

articles/components/dialog/index.adoc

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -118,36 +118,6 @@ endif::[]
118118
--
119119

120120

121-
=== Padding
122-
123-
The content area's built-in padding can be removed by applying the `no-padding` theme variant.
124-
125-
[.example]
126-
--
127-
128-
ifdef::lit[]
129-
[source,html]
130-
----
131-
include::{root}/frontend/demo/component/dialog/dialog-no-padding.ts[render,tags=*,indent=0,group=Lit]
132-
----
133-
endif::[]
134-
135-
ifdef::flow[]
136-
[source,java]
137-
----
138-
include::{root}/src/main/java/com/vaadin/demo/component/dialog/DialogNoPadding.java[render,tags=snippet,indent=0,group=Flow]
139-
----
140-
endif::[]
141-
142-
ifdef::react[]
143-
[source,tsx]
144-
----
145-
include::{root}/frontend/demo/component/dialog/react/dialog-no-padding.tsx[render,tags=snippet,indent=0,group=React]
146-
----
147-
endif::[]
148-
--
149-
150-
151121
== Modality
152122

153123
A modal dialog blocks the user from interacting with the rest of the user interface while the dialog is open. A non-modal dialog, however, doesn't block interaction. Dialogs are modal by default.
@@ -202,10 +172,10 @@ Dialog is not modal in server side by default. In some use cases you may want to
202172

203173
[source,java]
204174
----
205-
Dialog dialog = new Dialog();
206-
dialog.setModality(ModalityMode.STRICT);
207-
// Dialog needs to be added to layout
208-
add(dialog);
175+
Dialog dialog = new Dialog();
176+
dialog.setModality(ModalityMode.STRICT);
177+
// Dialog needs to be added to layout
178+
add(dialog);
209179
----
210180

211181

articles/components/dialog/styling.adoc

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,107 @@ order: 50
99
= Dialog Styling
1010
:toclevels: 2
1111

12+
13+
== Style Variants
14+
15+
The following variants are supported:
16+
17+
[cols="1,3,1"]
18+
|===
19+
| Variant | Description | Supported by
20+
21+
|`no-padding`
22+
|Used to remove the content area's built-in padding
23+
|Aura, Lumo
24+
25+
|===
26+
27+
[.example]
28+
--
29+
30+
ifdef::lit[]
31+
[source,html]
32+
----
33+
include::{root}/frontend/demo/component/dialog/dialog-no-padding.ts[render,tags=*,indent=0,group=Lit]
34+
----
35+
endif::[]
36+
37+
ifdef::flow[]
38+
[source,java]
39+
----
40+
include::{root}/src/main/java/com/vaadin/demo/component/dialog/DialogNoPadding.java[render,tags=snippet,indent=0,group=Flow]
41+
----
42+
endif::[]
43+
44+
ifdef::react[]
45+
[source,tsx]
46+
----
47+
include::{root}/frontend/demo/component/dialog/react/dialog-no-padding.tsx[render,tags=snippet,indent=0,group=React]
48+
----
49+
endif::[]
50+
--
51+
52+
include::../_styling-section-theming-props.adoc[tag=style-properties]
53+
54+
[cols="1,3,1"]
55+
|===
56+
| Feature | Property | Supported by
57+
58+
|Background
59+
|`--vaadin-dialog-background`
60+
|Aura
61+
62+
|Backdrop background
63+
|`--vaadin-overlay-backdrop-background`
64+
|Aura
65+
66+
|Border color
67+
|`--vaadin-dialog-border-color`
68+
|Aura
69+
70+
|Border width
71+
|`--vaadin-dialog-border-width`
72+
|Aura
73+
74+
|Border radius
75+
|`--vaadin-dialog-border-radius`
76+
|Aura
77+
78+
|Box shadow
79+
|`--vaadin-dialog-shadow`
80+
|Aura
81+
82+
|Max width
83+
|`--vaadin-dialog-max-width`
84+
|Aura
85+
86+
|Min width
87+
|`--vaadin-dialog-min-width`
88+
|Aura
89+
90+
|Padding
91+
|`--vaadin-dialog-padding`
92+
|Aura
93+
94+
|Title color
95+
|`--vaadin-dialog-title-color`
96+
|Aura
97+
98+
|Title font size
99+
|`--vaadin-dialog-title-font-size`
100+
|Aura
101+
102+
|Title font weight
103+
|`--vaadin-dialog-title-font-weight`
104+
|Aura
105+
106+
|Title line height
107+
|`--vaadin-dialog-title-font-weight`
108+
|Aura
109+
110+
|===
111+
112+
12113
include::../_styling-section-intros.adoc[tag=selectors]
13114

14115

0 commit comments

Comments
 (0)