-
-
Save sakymar/8b94b28024d61ebc110e9182a768c55f 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
{ | |
"Create stylesheet": { | |
"scope": "javascript,typescript,typescriptreact", | |
"prefix": "rnStyle", | |
"body": [ | |
"import { StyleSheet } from 'react-native'", | |
"import { colors } from '@internals/theme'", | |
"import { normalize } from '@internals/helpers'", | |
"", | |
"export default StyleSheet.create({", | |
"", | |
"})" | |
] | |
}, | |
"Create react component with styled": { | |
"scope": "javascript", | |
"prefix": "rcs", | |
"body": [ | |
"import React from 'React';", | |
"import styled from 'styled-components';", | |
"", | |
"const StyledContainer = styled.div``;", | |
"", | |
"function $1() {", | |
" return (", | |
" <StyledContainer>", | |
" <div></div>", | |
" </StyledContainer>", | |
" );", | |
"}", | |
"", | |
"export default $1;" | |
] | |
}, | |
"Create react native component": { | |
"scope": "typescript,javascript,typescriptreact", | |
"prefix": "rnComponent", | |
"body": [ | |
"import React from 'react'", | |
"import { View } from 'react-native'", | |
"import styles from './styles'", | |
"", | |
"interface Props {", | |
"}", | |
"", | |
"const ${1:${TM_DIRECTORY/^.+[\\/\\\\]+(.*)$/$1/}} = ({}: Props) => {", | |
"", | |
" return (", | |
" <View>", | |
" ", | |
" </View>)", | |
"}", | |
"", | |
"export default ${1:$TM_DIRECTORY/^.+[\\/\\\\]+(.*)$/$1/}" | |
] | |
}, | |
"Create react native screen": { | |
"scope": "typescript,javascript,typescriptreact", | |
"prefix": "rnScreen", | |
"body": [ | |
"import React from 'react'", | |
"import { StatusBar, View } from 'react-native'", | |
"import { globalStyles } from '@internals/styles'", | |
"", | |
"const ${1:${TM_DIRECTORY/^.+[\\/\\\\]+(.*)$/$1/}} = () => {", | |
"", | |
" return (", | |
" <View style={globalStyles.flex}>", | |
" <StatusBar backgroundColor='white' barStyle='dark-content' />", | |
" </View>)", | |
"}", | |
"", | |
"export default ${1:${TM_DIRECTORY/^.+[\\/\\\\]+(.*)$/$1/}}" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment