mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-08 01:14:24 +03:00
.. | ||
css | ||
js | ||
button.tpl | ||
README.md |
Компонент button
Кнопка
Шаблоны
button.tpl
Опция | Тип | По умолчанию | Описание |
---|---|---|---|
type |
string | 'submit' | Тип кнопки (submit, button) |
text |
string | null | Текст кнопки |
url |
string | null | Ссылка |
id |
string | null | Атрибут id |
name |
string | null | Атрибут name |
isDisabled |
boolean | false | Атрибут disabled |
form |
string | null | Селектор формы для сабмита |
icon |
string | null | Класс иконки |
classes |
string | null | Дополнительные классы (указываются через пробел) |
mods |
string | null | Список классов-модификаторов (указываются через пробел) |
attributes |
string | null | Атрибуты (указываются через пробел) |
Использование
Кнопка с дефолтным оформлением:
{include 'components/button/button.tpl' text='Отправить'}
Primary-кнопка:
{include 'components/button/button.tpl' mods='primary' text='Отправить'}
Кнопка-ссылка:
{include 'components/button/button.tpl' url='/topic/edit/1' text='Редактировать'}