Template:Alert/doc: Difference between revisions
ArrowHead294 (talk | contribs) m Update documentation to use label parameter. |
rewrite; emphasize (hopefully) usage as a metatemplate |
||
| (One intermediate revision by one other user not shown) | |||
| Line 4: | Line 4: | ||
=== Usage === | === Usage === | ||
The template accepts | The template accepts the following parameters: | ||
* <code>type</code>: Defines the color of the left border; the type should be chosen according to context, not for aesthetic reasons. Types are described in the next section. | * <code>type</code>: Defines the color of the left border; the type should be chosen according to context, not for aesthetic reasons. Types are described in the next section. | ||
* <code>text</code>: Message to be displayed in the box. | * <code>text</code>: Message to be displayed in the box. | ||
* <code>icon</code>: Icon to be displayed in the box, if provided. Icons appear on the left side of the message box. | * <code>icon</code>: Icon to be displayed in the box, if provided. Icons appear on the left side of the message box. Unlike mbox, alert uses an {{w|emoji}} rather than an image, which should be passed in using its {{w|HTML entity}} representation (e.g. use <code>&#x1F642;</code> for 🙂</code>). | ||
* <code>label</code>: A custom label, if provided. | |||
* <code>label</code>: | Templates that use this metatemplate (namely <code><nowiki>{{note}}</nowiki></code>, <code><nowiki>{{tip}}</nowiki></code>, and <code><nowiki>{{warning}}</nowiki></code>) should have pre-assigned values for <code>type</code>, <code>icon</code>, and <code>label</code>, leaving only <code>text</code> available to be modified. | ||
</ | |||
=== Types and examples === | === Types and examples === | ||