Skip to content

Instantly share code, notes, and snippets.

View mojitane's full-sized avatar

Maximilian Henrich mojitane

View GitHub Profile
const loadData = () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
let productArr = [];
for (let index = 0; index < 50; index++) {
productArr.push({
name: faker.commerce.productName(),
category: faker.commerce.department(),
price: faker.commerce.price(0.1, 5.0, 2, '€'),
});
const toggleMachine = Machine({
id: 'toggle',
initial: 'inactive',
states: {
inactive: {
on: { TOGGLE: 'active' },
},
active: {
on: { TOGGLE: 'inactive' },
},
@mojitane
mojitane / cloudSettings
Created November 9, 2018 22:48
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-11-09T22:47:32.421Z","extensionVersion":"v3.2.0"}
@import "initial-variables"
=arrow($color)
border: 1px solid $color
border-right: 0
border-top: 0
content: " "
display: block
height: 0.5em
pointer-events: none
'use strict';
document.addEventListener('DOMContentLoaded', function () {
// Modals
var rootEl = document.documentElement;
var $modals = getAll('.modal');
var $modalButtons = getAll('.modal-button');
var $modalCloses = getAll('.modal-background, .modal-close, .modal-card-head .delete, .modal-card-foot .button');