Skip to content

Instantly share code, notes, and snippets.

View nekitk's full-sized avatar

Nikita Golubov nekitk

View GitHub Profile
@nekitk
nekitk / mapbox-gl-styles.js
Created December 7, 2021 15:28
Mapbox GL vector and raster style examples
// See: https://docs.mapbox.com/help/glossary/style/
export const MAP_STYLES = [
// Vector styles
{
label: 'MapBox Light',
value: 'mapbox://styles/mapbox/light-v10',
},
{
label: 'MapBox Dark',
/* https://www.npmjs.com/package/postcss-nested */
.button {
&_theme_primary {
color: var(--color-text-active);
background-color: var(--color-bg-brand);
&:focus,
&:hover {
background-color: var(--color-bg-brand-hover);
import React from 'react'
export const getLazyComponent = (componentImport) => {
const LazyComponent = React.lazy(componentImport)
return () => (
<LazyComponentErrorBoundary>
<React.Suspense fallback={'Loading...'}>
<LazyComponent />
</React.Suspense>