Template:Warning: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<div style="border: 2px solid #f4a020; background-color: #fff3cd; padding: | <div class="warning-box" style="border: 2px solid #f4a020; background-color: #fff3cd; padding: 12px 15px; margin: 10px 0; border-radius: 4px; display: flex; align-items: flex-start; gap: 10px;"> | ||
<strong> | <span style="font-size: 1.4em;">{{#if: {{{icon|}}} | {{{icon}}} | ⚠️ }}</span> | ||
<div><strong>{{#if: {{{title|}}} | {{{title}}} | Warning }}</strong><br/>{{{1|}}}</div> | |||
</div><noinclude> | </div><noinclude> | ||
== Usage == | == Usage == | ||
<pre>{{Warning|Your warning message here.}}</pre> | <pre>{{Warning|Your warning message here.}}</pre> | ||
== | With optional parameters: | ||
<pre>{{Warning|Your warning message here.|title=Caution|icon=🛑}}</pre> | |||
== Examples == | |||
{{Warning|This page is under construction.}} | {{Warning|This page is under construction.}} | ||
{{Warning|This action cannot be undone.|title=Caution|icon=🛑}} | |||
<templatedata> | <templatedata> | ||
| Line 23: | Line 29: | ||
"description": "Custom title for the warning box.", | "description": "Custom title for the warning box.", | ||
"type": "string", | "type": "string", | ||
"required": false, | |||
"default": "Warning", | "default": "Warning", | ||
"example": "Caution" | "example": "Caution" | ||
| Line 30: | Line 37: | ||
"description": "Custom emoji or icon to display.", | "description": "Custom emoji or icon to display.", | ||
"type": "string", | "type": "string", | ||
"required": false, | |||
"default": "⚠️", | "default": "⚠️", | ||
"example": "🛑" | "example": "🛑" | ||
Revision as of 18:57, 1 January 2026
{{#if: | {{{icon}}} | ⚠️ }}
{{#if: | {{{title}}} | Warning }}
Usage
{{Warning|Your warning message here.}}
With optional parameters:
{{Warning|Your warning message here.|title=Caution|icon=🛑}}
Examples
{{#if: | {{{icon}}} | ⚠️ }}
{{#if: | {{{title}}} | Warning }}
This page is under construction.
This page is under construction.
{{#if: 🛑 | 🛑 | ⚠️ }}
{{#if: Caution | Caution | Warning }}
This action cannot be undone.
This action cannot be undone.
Displays a warning box to highlight important cautionary information.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Message | 1 | The warning message to display.
| String | required |
| Title | title | Custom title for the warning box.
| String | optional |
| Icon | icon | Custom emoji or icon to display.
| String | optional |