mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-26 13:35:24 +08:00
[add] StyleSheet.compose
As per the recent addition to React Native.
This commit is contained in:
@@ -21,6 +21,22 @@ const StyleSheetScreen = () => (
|
||||
</Description>
|
||||
|
||||
<Section title="Methods">
|
||||
<DocItem
|
||||
description={
|
||||
<AppText>
|
||||
Combines two styles such that <Code>style2</Code> will override any styles in{' '}
|
||||
<Code>style1</Code>. If either style is falsy, the other one is returned without
|
||||
allocating an array, saving allocations and maintaining reference equality for{' '}
|
||||
<Code>PureComponent</Code> checks.
|
||||
</AppText>
|
||||
}
|
||||
example={{
|
||||
code: 'StyleSheet.compose(style1, style2);'
|
||||
}}
|
||||
name="compose"
|
||||
typeInfo="(style1, style2) => style"
|
||||
/>
|
||||
|
||||
<DocItem
|
||||
description="Each key of the object passed to `create` must define a style object. The returned object replaces style objects with IDs"
|
||||
example={{
|
||||
|
||||
Reference in New Issue
Block a user