mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-28 16:45:17 +00:00
[change] StyleSheet.compose() deprecation
Encourage use of existing array syntax for multiple styles. Eventually we'll want to remove the compose() API to simplify the overall styling API.
This commit is contained in:
committed by
Nicolas Gallagher
parent
9868738604
commit
fc0d84fba4
@@ -44,11 +44,7 @@ Equal to 1px. This is not implemented using screen density as browsers may round
|
||||
|
||||
### Static methods
|
||||
|
||||
{% call macro.prop('compose', '(style1, style2) => Style') %}
|
||||
Combines two styles such that the last style overrides properties of the first style. If either style is falsy, the other one is returned without allocating an array, saving allocations and maintaining reference equality.
|
||||
{% endcall %}
|
||||
|
||||
{% call macro.prop('create', '({ [key]: ruleset }) => ({ [key]: number })') %}
|
||||
{% call macro.prop('create', '({ [key]: ruleset }) => ({ [key]: ruleset })') %}
|
||||
Define style objects. Each key of the object passed to `create` must define a style object. These values should not be introspected at runtime.
|
||||
{% endcall %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user