Last active
June 8, 2022 02:01
-
-
Save ruucm/262dfd7d3bc60c074c44dc91616e8034 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
{ | |
"useAnimation": { | |
"prefix": "ua", | |
"body": [ | |
"var ${2:animName}", | |
"export function ${1:OverrideName}(): Override {", | |
" ${2: animName} = useAnimation()", | |
" return {", | |
" animate: ${2: animName},", | |
" $3", | |
" }", | |
"}" | |
], | |
"description": "useAnimation" | |
}, | |
"Override": { | |
"prefix": "ov", | |
"body": [ | |
"export function ${1:Comp1}(props): Override {", | |
" return {", | |
" $2", | |
" };", | |
"}" | |
], | |
"description": "Override" | |
} | |
"onTap": { | |
"prefix": "ot", | |
"body": [ | |
"onTap: () => { $1 }" | |
], | |
"description": "onTap" | |
}, | |
"appState": { | |
"prefix": "as", | |
"body": [ | |
" const appState = Data({", | |
" taps: 0,", | |
" })" | |
], | |
"description": "appState" | |
}, | |
"React Component": { | |
"prefix": "rc", | |
"body": [ | |
"import * as React from \"react\";", | |
"", | |
"", | |
"export function ${1:Comp1}() {", | |
" return <div>${1:Comp1}</div>;", | |
"}", | |
"", | |
"${1:Comp1}.defaultProps = {};", | |
"" | |
], | |
"description": "React Component" | |
}, | |
"Framer React Component": { | |
"prefix": "frc", | |
"body": [ | |
"import * as React from \"react\";", | |
"import { Frame, addPropertyControls, ControlType } from \"framer\";", | |
"", | |
"export function ${1:Comp1}({prop1, ...rest}) {", | |
" return <Frame>{prop1}</Frame>;", | |
"}", | |
"", | |
"${1:Comp1}.defaultProps = {", | |
" prop1: \"Default prop1 Value\"", | |
"};", | |
"", | |
"addPropertyControls(${1:Comp1}, {", | |
" prop1: {", | |
" type: ControlType.String", | |
" }", | |
"});", | |
"" | |
], | |
"description": "Framer React Component" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment