mirror of
https://github.com/status-im/react-navigation-stack.git
synced 2025-02-18 09:27:01 +00:00
Update StackViewCard.js
This commit is contained in:
parent
eb22958703
commit
1c374ae1f1
@ -4,7 +4,6 @@ import { Screen } from 'react-native-screens';
|
||||
import createPointerEventsContainer from './createPointerEventsContainer';
|
||||
|
||||
const EPS = 1e-5;
|
||||
|
||||
function getAccessibilityProps(isActive) {
|
||||
if (Platform.OS === 'ios') {
|
||||
return {
|
||||
@ -49,11 +48,14 @@ class Card extends React.Component {
|
||||
...containerAnimatedStyle
|
||||
} = animatedStyle;
|
||||
|
||||
let flattenedStyle = StyleSheet.flatten(style) || {};
|
||||
let { backgroundColor, ...screenStyle } = flattenedStyle;
|
||||
|
||||
return (
|
||||
<Screen
|
||||
pointerEvents={pointerEvents}
|
||||
onComponentRef={this.props.onComponentRef}
|
||||
style={[StyleSheet.absoluteFill, containerAnimatedStyle, style]}
|
||||
style={[StyleSheet.absoluteFill, containerAnimatedStyle, screenStyle]}
|
||||
active={active}
|
||||
>
|
||||
{shadowOpacity ? (
|
||||
@ -66,7 +68,9 @@ class Card extends React.Component {
|
||||
{...getAccessibilityProps(isActive)}
|
||||
style={[
|
||||
transparent ? styles.transparent : styles.card,
|
||||
style ? { backgroundColor: style.backgroundColor } : {}
|
||||
backgroundColor && backgroundColor !== 'transparent'
|
||||
? { backgroundColor }
|
||||
: null,
|
||||
]}
|
||||
>
|
||||
{children}
|
||||
|
Loading…
x
Reference in New Issue
Block a user