Skip to content

Instantly share code, notes, and snippets.

Working on Bedrock2

Wolfr Wolfr

Working on Bedrock2
Block or report user

Report or block Wolfr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View film.js
export default {
title: "Film",
name: "film",
type: "document",
fields: [
title: "Name",
name: "name",
type: "string",
Wolfr / save-batch.js
Created Oct 18, 2018
Convert SVG icons that are stroke-based to expanded shapes in Illustrator. Use the Scripts functionality to run this script.
View save-batch.js
// Change this to your AI files folder (Be sure to end with a /)
var location = "/Users/Downloads/my-file/";
function getFiles() {
var folder = new Folder(location);
if (folder.exists) {
return folder.getFiles("*.svg");
} else {
alert("Unable to find SVG Files Folder");
Wolfr / figma-get-image-from-api.js
Created Sep 28, 2018
About the shortest code I could write to render an image out from the Figma API and make it clear whether it is loading/has loaded.
View figma-get-image-from-api.js
// About the shortest code I could write to render an image out from the Figma API and make it clear whether it is loading/has loaded.
// If you use this code please change to your own access token
const PERSONAL_ACCESS_TOKEN = ''; // Your personal access token here
function apiRequest(endpoint) {
return fetch('' + endpoint, {
method: 'GET',
headers: { "x-figma-token": PERSONAL_ACCESS_TOKEN }
Wolfr / icon-loop.pug
Created Aug 30, 2018
Document SVG icons in Bedrock
View icon-loop.pug
each category, id in icons.svg
if id
h3 #{id}
each icon in category
p #{}
View framer-x-simplest-component.tsx
// Here is the simplest component I could write
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
export class test extends React.Component<Props> {
render() {
return (
Wolfr / framer-x-with-css.tsx
Created Aug 24, 2018
Using CSS in Framer X component
View framer-x-with-css.tsx
// Here is a basic Framer X component where we use CSS directly
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
// Define type of property
interface Props {
width: number
height: number
View _colors.scss
/* ==========================================================================
Only define colors here. Don't use sass color functions, stick to hex values,
or the color component in styleguide won't regenerate automatically anymore.
========================================================================== */
/* Red
========================================================================== */
$material-color-red-50: #ffebee;
View colors.pug
each category in colorCategories
each color in category.colors
.br-color-swatch-preview(style=`background-color: ${color.value}`)
.swatch-value= color.value
View typography.pug
- var veryShortContent = 'Lorem ipsum';
- var shortContent = 'Lorem ipsum dolor sit amet';
- var longContent = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. '.repeat(5).trim()
- var samples = [];
- samples.push({name: 'Headline 1', code: '<h1 class="mdc-typography--headline1">' + veryShortContent + '</h1>', extraClass: contentClass})
- samples.push({name: 'Headline 2',code: '<h2 class="mdc-typography--headline2">' + veryShortContent + '</h2>', extraClass: contentClass})
- samples.push({name: 'Headline 3', code: '<h3 class="mdc-typography--headline3">' + shortContent + '</h3>', extraClass: contentClass})
- samples.push({name: 'Headline 4', code: '<h4 class="mdc-typography--headline4">' + shortContent + '</h4>', extraClass: contentClass})
- samples.push({name: 'Headline 5', code: '<h5 class="mdc-typography--headline5">' + shortContent + '</h5>', extraClass: contentClass})
- samples.push({name: 'Headline 6', code: '<h6 class="mdc-typ
View button-mixin.pug
//- Button 1.1
//- 1.1: Added disabled state
mixin c-button(options, attributes)
- DEFAULT_OPTIONS.label = 'Button label' // string
- = 'default' // string
- DEFAULT_OPTIONS.size = false // string
- DEFAULT_OPTIONS.href = false // string
- DEFAULT_OPTIONS.icon = false // boolean
- DEFAULT_OPTIONS.disabled = false // boolean
You can’t perform that action at this time.