How to use the react-color.default function in react-color

To help you get started, we’ve selected a few react-color 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 javierbyte / cohesive-colors / src / components / ColorBar / index.js View on Github external
import React from "react";
import ClickOutside from "react-click-outside";

const _ = require("lodash");
const ColorPickerPackage = require("react-color");
const Clipboard = require("clipboard");

const ColorPicker = ColorPickerPackage.default;

class ColorBar extends React.Component {
  constructor(props) {
    super(props);
  }

  state = {
    currentlyEditing: -1,
    popupPosition: {
      zIndex: 10,
      position: "fixed",
      top: "0px",
      left: "0px"
    }
  };