« Modèle:Button » : différence entre les versions
De 21Wiki
(Page blanchie) Balises : Blanchiment Éditeur de wikicode 2017 |
Aucun résumé des modifications Balise : Éditeur de wikicode 2017 |
||
Ligne 1 : | Ligne 1 : | ||
== 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> | |||
[[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> |
Version du 9 juin 2024 à 10:32
Example
Modèle:Clickable button → {{Clickable button|color=white}}
Modèle:Clickable button → {{Clickable button|color=red}}
Modèle:Clickable button → {{Clickable button|color=blue}}
[[target|Modèle:Clickable button]] → [[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 Modèle:Tl which adds links automatically)
Templatedata
Creates a OOUI styled button.
Paramètre | Description | Type | État | |
---|---|---|---|---|
Label | text 1 | aucune description | Contenu | obligatoire |
Color of the button | color | Can be blue (progressive), red (destructive) or white | Chaîne | suggéré |