Шаблон:Clickable button: различия между версиями
Template:Clickable button>Krinkle (support named parameter) |
м (1 revision imported) |
||
(не показаны 4 промежуточные версии этого же участника) | |||
Строка 1: | Строка 1: | ||
<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>{{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">{{{text|{{{1|Button text}}}}}}</span><noinclude>{{Documentation}} | ||
</noinclude> | <templatedata> | ||
{ | |||
"params": { | |||
"1": {}, | |||
"color": {}, | |||
"text": {}, | |||
"link": { | |||
"type": "wiki-page-name" | |||
} | |||
} | |||
} | |||
</templatedata></noinclude> |
Текущая версия от 19:28, 31 января 2024
Example
→ {{Clickable button|color=white}}
→ {{Clickable button|color=red}}
→ {{Clickable button|color=blue}}
→ [[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
<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
- {{Clickable button 2}} for
<templatedata> { "params": { "1": {}, "color": {}, "text": {}, "link": { "type": "wiki-page-name" } } } </templatedata>