From d509a1bb2523c1d164295f9bc842a0dc55922441 Mon Sep 17 00:00:00 2001 From: Inna Belaya Date: Fri, 3 Apr 2015 15:55:32 +0300 Subject: [PATCH] view_plain modifier described --- common.blocks/button/button.en.md | 27 +++++++++++++++++++++++++-- common.blocks/button/button.ru.md | 26 ++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/common.blocks/button/button.en.md b/common.blocks/button/button.en.md index d879c72a5..ff7182c7d 100644 --- a/common.blocks/button/button.en.md +++ b/common.blocks/button/button.en.md @@ -16,7 +16,7 @@ Use this block for creating different types of buttons. | hovered | true | – | The hovered state. | | theme | 'islands' | BEMJSON | A custom design. | | size | 's', 'm', 'l', 'xl' | BEMJSON | The size of the button. Use sizes only for buttons with the theme modifier set to islands.| -| view | 'action', 'pseudo' | BEMJSON | Visual highlighting.| +| view | 'action', 'pseudo', 'plain' | BEMJSON | Visual highlighting.| ### Custom fields of the block @@ -257,7 +257,7 @@ Sets the size value for all types of buttons. #### `view` modifier -Acceptable values: `'action'`, `'pseudo'`. +Acceptable values: `'action'`, `'pseudo'`, `'plain'`. Use case: `BEMJSON`. @@ -293,6 +293,29 @@ The modifier changes visual representation of the button. For example, use it if } ``` +##### Borderless button (`view` modifier with `plain` value) + +Use this modifier to create a button based on the other block. For example, iconed-button ([icon](../icon/icon.en.md)). + +```js +{ + block : 'button', + mods : { theme : 'islands', size : 'm', view : 'plain' }, + text : 'Borderless button' +} +``` + +```js +{ + block : 'button', + mods : { theme : 'islands', size : 'm', view : 'plain' }, + icon : { + block : 'icon', + mods : { social : 'twitter' } + } +} +``` + ### Custom fields of the block diff --git a/common.blocks/button/button.ru.md b/common.blocks/button/button.ru.md index 3c06b4fc3..f0587c0b4 100644 --- a/common.blocks/button/button.ru.md +++ b/common.blocks/button/button.ru.md @@ -16,7 +16,7 @@ | hovered | true | – | Наведение курсором. | | theme | 'islands' | BEMJSON | Стилевое оформление. | | size | 's', 'm', 'l', 'xl' | BEMJSON | Размер кнопки. Используется для кнопок с модификатором theme в значении islands.| -| view | 'action', 'pseudo' | BEMJSON | Тип визуального выделения кнопки.| +| view | 'action', 'pseudo', 'plain' | BEMJSON | Тип визуального выделения кнопки.| ### Специализированные поля блока @@ -257,7 +257,7 @@ #### Модификатор `view` -Допустимые значения: `'action'`, `'pseudo'`. +Допустимые значения: `'action'`, `'pseudo'`, `'plain'`. Способ использования: `BEMJSON`. @@ -293,6 +293,28 @@ } ``` +##### Кнопка без границ (модификатор `view` в значении `plain`) + +Используется при необходимости представить кнопкой другой блок, например, иконку ([icon](../icon/icon.ru.md)). + +```js +{ + block : 'button', + mods : { theme : 'islands', size : 'm', view : 'plain' }, + text : 'Кнопка без границ' +} +``` + +```js +{ + block : 'button', + mods : { theme : 'islands', size : 'm', view : 'plain' }, + icon : { + block : 'icon', + mods : { social : 'twitter' } + } +} +``` ### Специализированные поля блока