« Modèle:Clickable button » : différence entre les versions

De BerryRocket
meta>Zhuyifei1999
m (- extra linebreak)
meta>Tinss
(Updated templatedata color parameter to reflect that the button can also be white or green)
Ligne 1 : Ligne 1 :
<onlyinclude>{{#if:{{{3|{{{external|}}}}}}
<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">{{{1|Button text}}}</span>
  | <span class="plainlinks" {{#if:{{{id|}}}|id="{{{id}}}"}}>[{{{1|{{{target|//parameter_target_is_empty.de}}}}}} <span class="submit ui-button ui-widget ui-state-default ui-corner-all {{Clickable button/iconclass
<noinclude>
    |{{{4|{{{iconPrimary|}}}}}}
<templatedata>
    |{{{5|{{{iconSecondary|}}}}}}
{
    |{{{2|{{{text|<noinclude>x</noinclude>}}}}}}
"params": {
  }} {{{class|}}}" role="button" aria-disabled="false"><!-- // -->{{#if:{{{4|{{{iconPrimary|}}}}}}
"1": {
  |<span class="ui-button-icon-primary ui-icon {{{4|{{{iconPrimary}}}}}}">&nbsp;</span>
"label": "Label",
  }}<span class="ui-button-text">{{{2|{{{text|Parameter '''text''' is empty}}}}}}</span>{{#if:{{{5|{{{iconSecondary|}}}}}}
"required": true
  |<span class="ui-button-icon-secondary ui-icon {{{5|{{{iconSecondary|}}}}}}">&nbsp;</span>
},
  }}</span>]</span><!--
"color": {
  -->
"label": "Color of the button",
  | [[{{{1|{{{target|Parameter target is empty!}}}}}}|<span class="submit ui-button ui-widget ui-state-default ui-corner-all {{Clickable button/iconclass
"description": "Can be blue (progressive), red (destructive), green (constructive) or white",
    |{{{4|{{{iconPrimary|}}}}}}
"suggested": true
    |{{{5|{{{iconSecondary|}}}}}}
}
    |{{{2|{{{text|<noinclude>x</noinclude>}}}}}}
},
  }} {{{class|}}}" role="button" aria-disabled="false" {{#if:{{{id|}}}|id="{{{id}}}"}}><!-- // -->{{#if:{{{4|{{{iconPrimary|}}}}}}
"description": "Creates a OOui styled button."
  |<span class="ui-button-icon-primary ui-icon {{{4|{{{iconPrimary}}}}}}">&nbsp;</span>
}
  }}<span class="ui-button-text">{{{2|{{{text|Parameter '''text''' is empty}}}}}}</span>{{#if:{{{5|{{{iconSecondary|}}}}}}
</templatedata>
  |<span class="ui-button-icon-secondary ui-icon {{{5|{{{iconSecondary|}}}}}}">&nbsp;</span>
</noinclude>
  }}</span>]]
}}<!--
 
 
--></onlyinclude>
{{documentation}}
<!-- Add categories and interwikis to Template:Clickable button/doc subpage, not here! -->

Version du 11 mars 2018 à 17:55

Button text

Creates a OOui styled button.

Paramètres du modèle

ParamètreDescriptionTypeÉtat
Label1

aucune description

Inconnuobligatoire
Color of the buttoncolor

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

Inconnusuggéré