Skip to content

Instantly share code, notes, and snippets.

@ruucm
Last active June 8, 2022 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ruucm/262dfd7d3bc60c074c44dc91616e8034 to your computer and use it in GitHub Desktop.
Save ruucm/262dfd7d3bc60c074c44dc91616e8034 to your computer and use it in GitHub Desktop.
{
"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