Template:Alert: Difference between revisions

From Aphelium
(Created page with "<div class="alert alert-{{{type}}}> {{{content}}} </div>")
 
(Undo revision 278 by Aphelium (talk))
Tag: Undo
 
(33 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="alert alert-{{{type}}}>
<div class="alert alert-{{{type}}}>
<div class="alert-icon">
{{#switch: {{{type}}}
| info = [[File:Infor-circle.png]]
| warning = [[File:Warning-circle.svg]]
}}
</div>
{{{content}}}
{{{content}}}
</div>
</div>
<noinclude>
<templatedata>
{
"description": "An alert box",
"params": {
"type": {
"label": "Type",
"type": "string",
"required": true,
"example": "info",
"suggestedvalues": [
"info",
"warning",
"danger",
"success"
]
},
"content": {
"label": "Content",
"description": "The content of the alert",
"example": "This is an info box",
"type": "content",
"required": true
}
},
"format": "block"
}
</templatedata>
</noinclude>

Latest revision as of 15:57, 22 May 2023

{{{content}}}

An alert box

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Typetype

no description

Suggested values
info warning danger success
Example
info
Stringrequired
Contentcontent

The content of the alert

Example
This is an info box
Contentrequired