How to use react-shadow - 1 common examples

To help you get started, we’ve selected a few react-shadow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gimenete / unicycle / src / previews.tsx View on Github external
import { throttle } from 'lodash'
import * as React from 'react'
import DiffImagePopover from './components/DiffImagePopover'
import InputPopover from './components/InpuPopover'
import MediaPopoverProps from './components/MediaPopover'
import editors from './editors'
import { Message } from './editors/index'
import errorHandler from './error-handler'
import inspector from './inspector'
import renderComponent from './preview-render'
import { DiffImage, Media, State, States } from './types'
import workspace from './workspace'

// const throttledGenerate = throttle(() => workspace.generate(errorHandler), 3000)

const ShadowDOM = require('react-shadow').default

const Panel = Collapse.Panel

const mediaQuery = require('css-mediaquery')

interface PreviewsProps {
  activeComponent: string

interface PreviewsState {
  inspecting: boolean
  showGrid: boolean
  isOutputOpen: boolean
  diffMode: string
  diffValue: number


Utilise Shadow DOM in React with all the benefits of style encapsulation.

Latest version published 10 months ago

Package Health Score

66 / 100
Full package analysis

Popular react-shadow functions

Similar packages