Skip to content

Instantly share code, notes, and snippets.

@alalfakawma
alalfakawma / helper.scss
Last active January 30, 2021 14:42
Bulma SCSS Table column width helper
/*
Author: Aseem Lalfakawma <alalfakawma.github.io>
This SCSS mixin will allow sizing of table columns in Bulma CSS Framework.
The Bulma framework does not support this yet, this small code snippet fixes this.
USAGE:
* Should be applied on TH element, it controls all the columns under it *
The class should be "is-#",
is-1 will give the first widthamount, is-2 will give the second.
Eg. The code below shows the widthAmounts as (1, 2.5, 3, 4 , 5, 6, 7)
@brunolemos
brunolemos / debounce.js
Created December 20, 2016 00:53
React Debounce Render
// usage:
// export default debounce(100)(MyComponent);
import React from 'react';
import debounce from 'lodash/debounce';
export default (interval, ...debounceArgs) => {
if (typeof interval !== 'number' && interval > 0) {
throw new Error('[debounce] Interval (ms) parameter not received.');
}