Skip to content

Instantly share code, notes, and snippets.

0x44B882617388e462A9d58A06F07e913fA341b385
'.source.js':
'sdiv':
'prefix': 'sdiv'
'body': """
const $1 = styled.div`
$0
`;
"""
@mqklin
mqklin / Redux remover
Last active September 13, 2018 14:12
// getContext.js
import React, {Component} from 'react';
const {Provider, Consumer} = React.createContext();
const getContext = keys => WrappedComponent => props => (
<Consumer>
{state => (
<WrappedComponent
@mqklin
mqklin / iframe.js
Created December 11, 2018 04:03
0x
import React, {Component} from 'react';
import styled from 'styled-components';
import {forbidExtraProps} from 'airbnb-prop-types';
const Wr = styled.div`
`;
const Container = styled.div`
max-width: 1200px;
padding: 0 15px;
import React, {Component} from 'react';
import styled, {css} from 'styled-components';
import {forbidExtraProps, explicitNull, or} from 'airbnb-prop-types';
import getContext from 'getContext';
import {onlyUpdateForKeys} from 'recompose';
import {string, object, number, func, array} from 'prop-types';
import {Link, ButtonContainer, BounceSpinner, ReconnectOverlay} from 'App/dumb';
import SelectAssetModal from './SelectAssetModal';
import {t, formatToTwoNonZeroDecimals, webConnector, convertToEth} from 'App/utils';
import trustedAssetsRaw from './trustedAssetsRaw';
import React, {memo, useContext} from 'react';
const Context = React.createContext();
export function withContext(Component, keys) {
Component = memo(Component);
return memo(function(props) {
let state = useContext(Context);
if (process.env.NODE_ENV !== 'production') {
keys.forEach(key => {
if (props.hasOwnProperty(key) && state.hasOwnProperty(key)) {
import React, {
useEffect,
} from 'react';
import styled, {css} from 'styled-components';
import {forbidExtraProps} from 'airbnb-prop-types';
import {ButtonContainer, SelectAssetModal} from 'App/dumb';
import {func, string, object} from 'prop-types';
import {withContext} from 'withContext';
import Values from './Values';
import payFeeAssetsRaw from './payFeeAssetsRaw';
const MAX_WIDTH = 1200;
const MIN_WIDTH = 320;
export default function getSize(windowInnerWidth, ...values) {
if (values.some(({x1: x11, x2: x12}, idx1) => {
return values.some(({x1: x21, x2: x22}, idx2) => {
if (idx1 === idx2) {
return false;
}
const max1 = Math.max(x11, x12);
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:QmcVVXoRrkYnYtMAwPLgGWSQgWqFVYkGcxsJco3yfBj56u ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
function StakedModal() {
const {modal} = ModalContext.useContext(['modal']);
const [{
modals,
}, ss] = useStateReducer({
modals: [],
});
const create = () => {