Jump to content

Template:Clickable button: Difference between revisions

From mediawiki.org
Content deleted Content added
mNo edit summary
m Moved to /sandbox
Tag: Undo
Line 1: Line 1:
<span class="mw-ui-button {{#switch: {{{color|white}}} | red = mw-ui-destructive | green = mw-ui-constructive | white = | blue = mw-ui-progressive}}" role="button" aria-disabled="false" {{#switch:{{{color|}}}|green|vert=style="background-color:#00af89;border-color:#00af89;color:#fff;"}}>{{{1|Button text}}}</span><noinclude>{{Documentation}}
<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" {{#switch:{{{color|}}}|green|vert=style="background-color:#00af89;border-color:#00af89;color:#fff;"}}>{{{1|Button text}}}</span><noinclude>{{Documentation}}
</noinclude>
</noinclude>

Revision as of 11:21, 25 June 2019

Button text

Template documentation


Example

Button text → {{Clickable button|color=white}}

Button text → {{Clickable button|color=red}}

Button text → {{Clickable button|color=blue}}

text → [[target|{{Clickable button|text}}]] (for links. To add links, transclude this template inside wikilinks after the pipebar: [[target title|{{Clickable button|text}}]]. Or better use {{Clickable button 2 }} which adds links automatically)

Templatedata

Creates a OOUI styled button.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Labeltext 1

no description

Contentrequired
Color of the buttoncolor

Can be blue (progressive), red (destructive) or white

Stringsuggested

See also