Created
March 22, 2020 17:47
-
-
Save aakagi/a0cd11fad28c5b69788fb77dbbfd5d9c to your computer and use it in GitHub Desktop.
This file contains 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, | |
Text, | |
StyleSheet, | |
ViewStyle, | |
StyleProp, | |
} from 'react-native'; | |
interface Props { | |
style?: StyleProp<ViewStyle>; | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
}, | |
}); | |
const Name = (props: Props) => { | |
return ( | |
<View style={[styles.container, props.style]}> | |
<Text> | |
</Text> | |
</View> | |
); | |
}; | |
export default Name; |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
import React from 'react'; | |
import { | |
View, | |
Text, | |
StyleSheet, | |
ViewStyle, | |
StyleProp, | |
} from 'react-native'; | |
interface Props { | |
style?: StyleProp<ViewStyle>; | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
}, | |
}); | |
const ${1:name} = (props: Props) => { | |
return ( | |
<View style={[styles.container, props.style]}> | |
<Text> | |
</Text> | |
</View> | |
); | |
}; | |
export default ${1:name}; | |
]]></content> | |
<tabTrigger>react-native-component</tabTrigger> | |
<scope>source.js</scope> | |
<description>Generic React Native Component</description> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment