This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import PropTypes from "prop-types"; | |
import styled from "styled-components"; | |
import debounce from "lodash/debounce"; | |
class OverflowShadow extends React.Component { | |
state = { scrollPos: null } | |
componentDidMount = () => { | |
const el = this.containerRef.current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const customisableStyledComponents = (componentFactory, defaultStyledCmpts) => | |
(overrideStyledCmpts = {}) => { | |
const customisedCmpts = Object.entries(overrideStyledCmpts) | |
.map(([componentName, customiseCmptFn]) => | |
[componentName, customiseCmptFn(defaultStyledCmpts[componentName])]) | |
.reduce((acc, [k, v]) => | |
({ ...acc, [k]: v }), {}); | |
const mergedComponents = { ...defaultStyledCmpts, ...customisedCmpts }; | |
return componentFactory(mergedComponents); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { assert } from 'chai' | |
import { curry, forEachObjIndexed } from 'ramda' | |
const find = (wrapper, matcher) => | |
wrapper.findWhere(x => | |
x.prop('data-test') && | |
x.prop('data-test') | |
.trim() | |
.split(' ') | |
.includes(matcher) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import styled from 'styled-components' | |
import L from 'leaflet' | |
import d3 from 'services/d3' | |
import * as topojson from 'topojson-client' | |
import 'leaflet/dist/leaflet.css' | |
/*=========================================================== | |
= Leaflet assets importing issues fix = |