Template:Messagebox: Difference between revisions
No edit summary |
adds better documentation |
||
| Line 20: | Line 20: | ||
<noinclude> | <noinclude> | ||
== Usage == | == Usage == | ||
The template takes | The template takes three named parameters that can be given in any order. | ||
; text : (required) is the message | |||
; type : (optional) determines the presentation using pre-defined styling. One of | |||
:* success | |||
:* warning | |||
:* failure | |||
:* normal (default) | |||
; style : (optional) is CSS that will be passed through. | |||
== Literal Example == | |||
<pre> | <pre> | ||
{{Messagebox | {{Messagebox | ||
|type = success | | type = success | ||
|text = your message content | | style = width:50%; | ||
| text = your message content | |||
}} | }} | ||
</pre> | </pre> | ||
| Line 31: | Line 40: | ||
For a more complex (up to 80 parameters) template, see the Infobox template [[Template_talk:Infobox]] | For a more complex (up to 80 parameters) template, see the Infobox template [[Template_talk:Infobox]] | ||
== Examples == | == Visual Examples == | ||
{{Messagebox | {{Messagebox | ||
|text = no type, uses default (normal) | | text = no type, uses default (normal) | ||
| style = width:50%; | |||
}} | }} | ||
{{Messagebox | {{Messagebox | ||
|type = normal | | type = normal | ||
|text = Why be normal? | | text = Why be normal? | ||
}} | }} | ||
{{Messagebox | {{Messagebox | ||
|type = success | | type = success | ||
|text = You won! | | text = You won! | ||
}} | }} | ||
{{Messagebox | {{Messagebox | ||
|type = warning | | type = warning | ||
|text = Do not spit into the wind | | text = Do not spit into the wind | ||
}} | }} | ||