Template:Clickable Button: Difference between revisions

From Pirate Software Wiki
(Created page with "{{documentation subpage}} == Example == {{Clickable button|color=white}} → <nowiki>{{Clickable button|color=white}}</nowiki> {{Clickable button|color=red}} → <nowiki>{{Clickable button|color=red}}</nowiki> {{Clickable button|color=blue}} → <nowiki>{{Clickable button|color=blue}}</nowiki> {{Clickable button|text}} → <nowiki>{{Clickable button|text}}</nowiki> (for links. To add links, transclude this template inside wikilinks after the pip...")
 
m (updated documentation to doc)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{documentation subpage}}
<span class="mw-ui-button {{#switch: {{{color|white}}} | red = mw-ui-destructive | green = mw-ui-progressive | white = | blue = mw-ui-progressive}}" role="button" aria-disabled="false">{{{text|{{{1|Button text}}}}}}</span>
 
<noinclude>
== Example ==
{{doc}}
{{Clickable button|color=white}} → <nowiki>{{Clickable button|color=white}}</nowiki>
</noinclude>
 
{{Clickable button|color=red}} → <nowiki>{{Clickable button|color=red}}</nowiki>
 
{{Clickable button|color=blue}} → <nowiki>{{Clickable button|color=blue}}</nowiki>
 
[[target|{{Clickable button|text}}]] → <nowiki>[[target|{{Clickable button|text}}]]</nowiki> (for links. To add links, transclude this template inside wikilinks after the pipebar: <nowiki>[[target title|{{Clickable button|text}}]]</nowiki>. Or better use {{tl|clickable button 2}} which adds links automatically)
== Templatedata ==
<templatedata>
{
"params": {
"color": {
"label": "Color of the button",
"description": "Can be blue (progressive), red (destructive) or white",
"suggested": true,
"type": "string"
},
"text": {
"aliases": [
"1"
],
"label": "Label",
"type": "content",
"required": true
}
},
"description": "Creates a OOUI styled button.",
"paramOrder": [
"text",
"color"
],
"format": "inline"
}
</templatedata>
== See also ==
* {{tl|Clickable button 2}} for {{Clickable button 2|Template:Clickable button 2}}

Latest revision as of 12:49, 31 December 2023

Button text

Documentation

This is the template for clickable button.

Usage

In a situation where you need an clickable button;

{{Clickable Button
| color = 
| text =  
}}

Parameters

  • color - The color of the button (default color is white. Other colors are red, green, blue.)
  • text - The text - default text is "Button text"


Examples

{{Clickable Button
| color = white
| text = Banana
}}

Banana