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

De BerryRocket
meta>Tinss
(Updated templatedata color parameter to reflect that the button can also be white or green)
meta>Trizek (WMF)
(green is no longer available (since a while...))
Ligne 1 : Ligne 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">{{{1|Button text}}}</span>
<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">{{{1|Button text}}}</span>
<noinclude>
<noinclude>
<templatedata>
<templatedata>
Ligne 10 : Ligne 10 :
"color": {
"color": {
"label": "Color of the button",
"label": "Color of the button",
"description": "Can be blue (progressive), red (destructive), green (constructive) or white",
"description": "Can be blue (progressive), red (destructive) or white",
"suggested": true
"suggested": true
}
}

Version du 15 mai 2019 à 19:49

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) or white

Inconnusuggéré