Skip to content

Instantly share code, notes, and snippets.

View winkerVSbecks's full-sized avatar
🥵

Varun Vachhar winkerVSbecks

🥵
View GitHub Profile
// .storybook/main.js
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
core: {
builder: 'webpack5',
},
webpackFinal: async (config) => {
// Mock modules
var svg = document.querySelector('.blocklySvg');
//get svg source.
var serializer = new XMLSerializer();
var source = serializer.serializeToString(svg);
//add name spaces.
if(!source.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/)){
source = source.replace(/^<svg/, '<svg xmlns="http://www.w3.org/2000/svg"');
}
@winkerVSbecks
winkerVSbecks / README.md
Last active February 4, 2019 15:00
SCRIPT-8
@winkerVSbecks
winkerVSbecks / README.md
Last active February 4, 2019 12:52
SCRIPT-8
@winkerVSbecks
winkerVSbecks / README.md
Created February 1, 2019 21:52
SCRIPT-8
@winkerVSbecks
winkerVSbecks / Heading.tsx
Created September 28, 2018 16:02
Framer Example
import * as React from 'react';
import { PropertyControls, ControlType } from 'framer';
import system from 'system-components';
import { theme } from './theme';
import { ThemeWrapper } from './ThemeWrapper';
const HeadingPrimitive = system(
{
is: 'h1',
fontFamily: 'light',
static propertyControls: PropertyControls = {
text: { type: ControlType.String, title: 'Text' },
fontSize: {
type: ControlType.FusedNumber,
toggleKey: 'fontPerBP',
toggleTitles: ['Font', 'Font per BP'],
valueKeys: ['font1', 'font2', 'font3', 'font4'],
valueLabels: theme.breakpoints.map(s => s.replace('px', '')),
min: 0,
title: 'Font Size',
<div class="vh-100 flex justify-center items-center">
<svg class="db w-100 mw7"
viewBox="0 0 640 640"
fill="white"
stroke="#333333"
stroke-width="8">
<rect width="256"
height="256"
x="264"
y="264" />
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/interval';
import 'rxjs/add/observable/race';
import 'rxjs/add/observable/empty';
import 'rxjs/add/observable/fromEvent';
import 'rxjs/add/observable/timer';
import 'rxjs/add/observable/merge';
import 'rxjs/add/observable/of';
import 'rxjs/add/operator/takeUntil';
@winkerVSbecks
winkerVSbecks / setup.md
Last active September 25, 2017 13:02
React Training

Setup

$ npm i create-react-app -g
$ create-react-app robodex
$ cd robodex
$ npm start

Resources