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
import { ComponentType, useRef, useState } from "react" | |
import { useEffect } from "react" | |
import { createStore } from "https://framer.com/m/framer/store.js@^1.0.0" | |
import { randomColor } from "https://framer.com/m/framer/utils.js@^0.9.0" | |
import * as SupabaseJs from "https://jspm.dev/@supabase/supabase-js@rc" | |
import _ from "lodash" | |
// Learn more: https://www.framer.com/docs/guides/overrides/ | |
export const useStore = createStore({ | |
background: "#0099FF", |
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
/* | |
Made by Elly Loel - https://ellyloel.com/ | |
With inspiration from: | |
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/ | |
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/ | |
- Adam Argyle - https://unpkg.com/[email protected]/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE | |
Notes: | |
- `:where()` is used to lower specificity for easy overriding. | |
*/ |
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
import { useEffect, useState } from "react" | |
import { motion, Variants } from "framer-motion" | |
import { addPropertyControls, ControlType } from "framer" | |
import React from "react" | |
// Welcome to Code in Framer | |
// Get Started: https://www.framer.com/docs/guides/ | |
export function useMediaQuery(query) { | |
const [matches, setMatches] = useState(false) |
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
import babel from '@babel/core' | |
import styled from 'babel-plugin-styled-components' | |
import fs from 'node:fs' | |
export default { | |
name: "styled-components", | |
setup({ onLoad }) { | |
const root = process.cwd(); | |
onLoad({ filter: /\.[tj]sx$/ }, async (args) => { | |
let code = await fs.promises.readFile(args.path, "utf8"); |
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
import { ReactNode } from 'react'; | |
import { motion } from 'framer-motion'; | |
type Props = { | |
children: ReactNode; | |
delay?: number; | |
}; | |
export default function WithBouncingAnimation({ children, delay }: Props) { | |
return ( |
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
import Layout from "@/components/Layout"; | |
import { getContentPaths } from "@/utils/getContentPaths"; | |
import { getPageFromSlug } from "@/utils/getPageFromSlug"; | |
import { GetStaticProps } from "next"; | |
import dynamic from "next/dynamic"; | |
import { renderToStaticMarkup } from "react-dom/server"; | |
export default function ContentPage({ __html, frontmatter, pages, slug }) { | |
const Content = dynamic(() => import(`../content/${slug}/index.mdx`), { | |
loading() { |
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
figma.showUI(__html__,{width: 250, height: 250}); | |
// restore previous size | |
figma.clientStorage.getAsync('size').then(size => { | |
if(size) figma.ui.resize(size.w,size.h); | |
}).catch(err=>{}); | |
figma.ui.onmessage = msg => { | |
switch (msg.type) { | |
case "resize": | |
figma.ui.resize(msg.size.w,msg.size.h); | |
figma.clientStorage.setAsync('size', msg.size).catch(err=>{});// save size |
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
import UIKit | |
class SimpleCollectionView: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource { | |
private var collectionView: UICollectionView! | |
private var cellRegistration: UICollectionView.CellRegistration<UICollectionViewListCell, Book>! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// View title | |
title = "Books - Collection" |
NewerOlder