From d0046754faf46ee891bdf7813f8dc73c1339cd05 Mon Sep 17 00:00:00 2001 From: Ze Yu Date: Fri, 31 Jul 2020 14:48:08 +0800 Subject: [PATCH 1/9] Add user guide slots section as modals --- docs/userGuide/components/advanced.md | 119 +++++++++----------------- docs/userGuide/syntax/boxes.mbdf | 6 +- docs/userGuide/syntax/dropdowns.mbdf | 4 +- docs/userGuide/syntax/modals.mbdf | 5 +- docs/userGuide/syntax/panels.mbdf | 4 +- docs/userGuide/syntax/popovers.mbdf | 6 +- docs/userGuide/syntax/questions.mbdf | 14 ++- 7 files changed, 64 insertions(+), 94 deletions(-) diff --git a/docs/userGuide/components/advanced.md b/docs/userGuide/components/advanced.md index 8e9a248577..1def9bdf02 100644 --- a/docs/userGuide/components/advanced.md +++ b/docs/userGuide/components/advanced.md @@ -1,81 +1,66 @@ ## Advanced Tips and Tricks -### Rich formatting in headings/titles +^\[S\]^ +Slot -Using the normal syntax, you are only able to use markdown formatting on headings. If you would like more styling options, you can define an element within the component that acts as your heading. This is done by adding a `slot` attribute with the correct name to that element. +### Richer formatting of attributes using slots - - Example
- -

- - R - A - I - N - B - O - W - -

- As shown in this panel, using the header slot allows you to customize the Panel's header using HTML. -
-
+
- - Example
- Click here to show Modal. - - - - Modal allows you to style both header and footer individually, with style classes and inline styles. -
- Tiny footer -
-
-
+Most component attributes allow a richer form of formatting using slots, denoted by an attribute^\[S\]^ superscript in the respective components' tables. +In other cases, when the option is of type "Slot", only the slot option is available. - -Markup +You can define such a slot within the component by adding a `slot="attribute name"` attribute to any element within the slot. -```html +{{ icon_example }} + + +

- R - A - I - N - B - O - W + R + A + I + N + B + O + W

- As shown in this panel, using the header slot allows you to customize the Panel's header using HTML. + As shown in this panel, using the header slot + allows you to customize the Panel's header using HTML.
+
+html +
+
+ + + + + +**Other examples of slots in use** + +{{ icon_example }} Custom modal header + + Click here to show Modal. -