Created
December 18, 2019 14:42
-
-
Save sami616/d91ea2cbd503dfb63abbfe164a3b9326 to your computer and use it in GitHub Desktop.
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
{ | |
"A Component": { | |
"prefix": [ | |
"component", | |
], | |
"body": [ | |
"import React from 'react'", | |
"import styled, { css } from 'styled-components'", | |
"", | |
"//x//////////////////////////////////////////////////", | |
"// ${1:Component}", | |
"//x//////////////////////////////////////////////////", | |
"", | |
"type ${1:Component}Props = {", | |
"\t${2}", | |
"}", | |
"", | |
"export const ${1:Component} = ({ ${3} }: ${1:Component}Props) => (", | |
"\t<S${1:Component}Wrap${4}>", | |
"\t\t${5: Component}", | |
"\t</S${1:Component}Wrap${4}>", | |
")", | |
"", | |
"//x//////////////////////////////////////////////////", | |
"// Styles", | |
"//x//////////////////////////////////////////////////", | |
"", | |
"// S${1:Component}Wrap${4}", | |
"", | |
"type S${1:Component}Wrap${4}Props = {", | |
"\t${6}", | |
"}", | |
"", | |
"const S${1:Component}Wrap${4} = styled${7:.div}<S${1:Component}Wrap${4}Props>(({ ${8} }) => css`", | |
"\t${9}", | |
"`)" | |
], | |
"description": "A React component." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment