Skip to content

Instantly share code, notes, and snippets.

@ivandoric
Created September 13, 2020 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivandoric/5b1a33e58a9c977be5e4cd88ba6e72fe to your computer and use it in GitHub Desktop.
Save ivandoric/5b1a33e58a9c977be5e4cd88ba6e72fe to your computer and use it in GitHub Desktop.
Snippet for bootstraping react component, as seen in this video: https://www.youtube.com/watch?v=WSOwvyNArOA
{
"Bootstrap Component": {
"prefix": "comp",
"body": [
"import { Box } from 'reflexbox'",
"import styled from '@emotion/styled'",
"",
"function $1() {",
" return (",
" <$1Styled>",
" <Box variant=\"container\">",
" <Box as=\"h2\" my={40}>",
" $2",
" </Box>",
" </Box>",
" </$1Styled>",
" )",
"}",
"",
"const $1Styled=styled.div`",
"`",
"",
"export default $1"
],
"description:": "Create a component"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment