|
29 | 29 | ), |
30 | 30 | ui.input_action_button("action1", "Action Button"), |
31 | 31 | ), |
32 | | - ui.layout_column_wrap( |
| 32 | + ui.layout_columns( |
33 | 33 | ui.value_box( |
34 | 34 | "Metric 1", |
35 | 35 | "100", |
|
121 | 121 | ), |
122 | 122 | ui.input_password("password1", "Password Input"), |
123 | 123 | ), |
124 | | - width=400, |
| 124 | + width=300, |
125 | 125 | heights_equal=False, |
126 | 126 | ), |
127 | 127 | ), |
128 | | - ui.nav_panel("Colors", ui.output_ui("ui_colors")), |
| 128 | + ui.nav_panel("Colors", ui.div(ui.output_ui("ui_colors"), class_="container-sm")), |
129 | 129 | ui.nav_panel( |
130 | 130 | "Documentation", |
131 | 131 | ui.div( |
@@ -286,22 +286,43 @@ def ui_colors(): |
286 | 286 | ui.div(f"{color}-{r}", class_=f"p-3 bd-{color}-{r}") |
287 | 287 | for r in range(100, 1000, 100) |
288 | 288 | ], |
289 | | - class_="col-md-4 mb-3", |
| 289 | + class_="mb-3", |
290 | 290 | ) |
291 | 291 | ] |
292 | 292 |
|
293 | 293 | return ui.TagList( |
| 294 | + ui.div( |
| 295 | + *[ |
| 296 | + ui.div( |
| 297 | + ui.div( |
| 298 | + color, class_=f"p-3 mb-2 position-relative text-bg-{color}" |
| 299 | + ), |
| 300 | + class_="col-md-3 mb-3", |
| 301 | + ) |
| 302 | + for color in [ |
| 303 | + "primary", |
| 304 | + "secondary", |
| 305 | + "dark", |
| 306 | + "light", |
| 307 | + "info", |
| 308 | + "success", |
| 309 | + "warning", |
| 310 | + "danger", |
| 311 | + ] |
| 312 | + ], |
| 313 | + class_="row font-monospace", |
| 314 | + ), |
294 | 315 | ui.div( |
295 | 316 | *[ |
296 | 317 | ui.div( |
297 | 318 | ui.div(color, class_=f"p-3 mb-2 position-relative bd-{color}"), |
298 | | - class_="col-md-4 mb-3", |
| 319 | + class_="col-md-3 mb-3", |
299 | 320 | ) |
300 | | - for color in ["black", "white"] |
| 321 | + for color in ["black", "white", "foreground", "background"] |
301 | 322 | ], |
302 | 323 | class_="row font-monospace", |
303 | 324 | ), |
304 | | - ui.div(*colors, class_="row font-monospace"), |
| 325 | + ui.layout_column_wrap(*colors, class_="font-monospace"), |
305 | 326 | ) |
306 | 327 |
|
307 | 328 |
|
|
0 commit comments