Skip to content

Instantly share code, notes, and snippets.

View PavelLaptev's full-sized avatar
📺
Long live the new flesh!

Pavel Laptev PavelLaptev

📺
Long live the new flesh!
View GitHub Profile
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
// Define type of properties
interface Props {
usersAmount: number;
}
interface States {
json: any;
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
// Define type of property
interface Props {
json: any;
}
interface States {
json: any;
import * as React from "react";
import { PropertyControls, ControlType, Stack } from "framer";
import { List_Item } from "./canvas";
// Define type of property
interface Props {
rows: number;
}
export class RandomMockDataList extends React.Component<Props> {
import * as React from "react";
import { Stack, PropertyControls, ControlType, Override } from "framer";
import { cardsData } from "./data/cards-data";
// Define type of property
interface Props {
width: number;
height: number;
itemsAmount: number;
}
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
import styled from "styled-components";
// Styled components
const InputWrappeer = styled.div`
display: flex;
flex-direction: column;
`;
import { Data, animate, Override, Animatable } from "framer";
const data = Data({ opacity: Animatable(0.3), currentPage: 0 });
let inputsValidity = Data({
login: false,
pass: false
});
const btnAnimationTime = 0.2;
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
// Define type of property
interface Props {
width: number;
listHeaderTitle: string;
}
export class RadioGroup extends React.Component<Props> {
// Set default properties
async function getFigmaObjTree(figmaApiKey, figmaId) {
let result = await fetch("https://api.figma.com/v1/files/" + figmaId, {
method: "GET",
headers: {
"X-Figma-Token": figmaApiKey
}
});
let figmaTreeStructure = await result.json();
console.log(figmaTreeStructure);
}
async function getStylesArtboard(figmaApiKey, figmaId) {
const result = await fetch("https://api.figma.com/v1/files/" + figmaId, {
method: "GET",
headers: {
"X-Figma-Token": figmaApiKey
}
});
const figmaTreeStructure = await result.json();
const stylesArtboard = figmaTreeStructure.document.children.filter(item => {
{
"token": {
"font": {
"h1": {
"desktop": {
"family": {
"value": "Zilla Slab"
},
"weight": {
"value": "bold"