You've already forked The-API-Book
mirror of
https://github.com/twirl/The-API-Book.git
synced 2025-08-10 21:51:42 +02:00
style fix
This commit is contained in:
@@ -70,7 +70,7 @@ An alternative approach is to expose the possibility of defining rules for how e
|
||||
api.options.addRule(
|
||||
'button.checkout.iconUrl',
|
||||
(data, options) => data.iconUrl
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
The most coherent implementation of this approach is the CSS technology.[ref CSS](https://www.w3.org/Style/CSS/) We are not actually proposing using a full CSS rule engine in component libraries (because of its overwhelming complexity and excessiveness for most cases), but we are cautiously drawing the reader's attention to the fact that supporting some subset of CSS-like rules could *significantly* simplify the task of customizing UI components.
|
||||
|
@@ -70,7 +70,7 @@ if (data.createOrderButtonIconUrl) {
|
||||
api.options.addRule(
|
||||
'button.checkout.iconUrl',
|
||||
(data, options) => data.iconUrl
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
Наиболее последовательная реализация этого подхода — CSS[ref CSS](https://www.w3.org/Style/CSS/). Мы не то чтобы рекомендуем использовать CSS-подобные правила в библиотеках компонентов (в силу потрясающей сложности их имплементации и, в большинстве случаев, избыточности), но осторожно замечаем, что поддержка какого-то простого подмножества подобного рода правил *значительно* облегчает кастомизацию визуальных компонент для разработчиков.
|
||||
|
Reference in New Issue
Block a user