Created
October 11, 2022 08:49
-
-
Save anatooly/c9f1553e773662bbd6f8e9c500aa5dc9 to your computer and use it in GitHub Desktop.
ArbitrarySizeViewIos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import {View, Platform} from 'react-native' | |
const ARBITRARY_SIZE = 1000 | |
const ArbitrarySizeViewIos = (props) => { | |
if (Platform.OS !== 'ios') return null | |
const backgroundColor = props?.backgroundColor | |
return ( | |
<View | |
style={{ | |
backgroundColor, | |
height: ARBITRARY_SIZE, | |
position: 'absolute', | |
top: -ARBITRARY_SIZE, | |
left: 0, | |
right: 0, | |
}} | |
/> | |
) | |
} | |
export default ArbitrarySizeViewIos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment