I hereby claim:
- I am segunadebayo on github.
- I am segunadebayo (https://keybase.io/segunadebayo) on keybase.
- I have a public key ASBtVZhQf8x-7k_u2iDgxtq2GHJ7Y_95v2SS0-viWQg2fwo
To claim this, I am signing this object:
/*jshint node:true*/ | |
'use strict'; | |
/** | |
* This scripts recursively renames every file and directory in the script path | |
* from camelCase and UpperCamelCase to dash-case | |
* | |
* Do a backup before executing this script | |
* | |
* @lecense MIT |
const { ApolloServer, gql, makeExecutableSchema } = require('apollo-server') | |
const { applyMiddleware } = require('graphql-middleware') | |
const uppercaseCategory = async (resolve, parent, args, context, info) => { | |
const result = await resolve(parent, args, context, info) | |
return result.toUpperCase() | |
} | |
const postsMiddleware = async (resolve, parent, args, context, info) => { |
I hereby claim:
To claim this, I am signing this object:
/* Reset | |
=============================================================================*/ | |
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
} | |
/* Body |
export interface PaginationOptions { | |
total: number; | |
current: number; | |
noOfSiblings?: number; | |
} | |
export function pagination(options: PaginationOptions) { | |
const { total, noOfSiblings, current } = validate(options); | |
const max = 2 * noOfSiblings + 5; |
const menuMachine = Machine( | |
{ | |
id: "menu-machine", | |
initial: "idle", | |
context: { | |
activeDescendantId: null, | |
menuId: "", | |
buttonId: "", | |
onSelect: () => {} | |
}, |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
async function getComponents(fileKey, token) { | |
// Get file | |
const file = await fetch(`https://api.figma.com/v1/files/${fileKey}`, { | |
headers: { "X-Figma-Token": token } | |
}).then((r) => r.json()) | |
if (file.err === undefined) { | |
// Get style ids | |
const styleIds = Object.keys(file.styles) |
{ | |
"document": { | |
"id": "0:0", | |
"name": "Document", | |
"type": "DOCUMENT", | |
"children": [ | |
{ | |
"id": "0:1", | |
"name": "Page 1", | |
"type": "CANVAS", |
// Button.js => Button.css
import { chakra } from "@chakra-ui/magic";
import "@chakra-ui/css/Button.css";
<chakra.button mb="2" mt="2" _hover={{ bg: "red.200", _focus: {} }} />;
<button css={{mb: "2", mt="2", _hover: { bg: "red.200", _focus: {} }} />
const result = interpret(