How to use the react-sortable-hoc/dist/es6.SortableElement function in react-sortable-hoc

To help you get started, we’ve selected a few react-sortable-hoc 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 Kong / insomnia / packages / insomnia-app / app / ui / components / modals / workspace-environments-edit-modal.js View on Github external
lineWrapping: boolean,
  render: Function,
  getRenderContext: Function,
  nunjucksPowerUserMode: boolean,
  isVariableUncovered: boolean,
};

type State = {
  workspace: Workspace | null,
  isValid: boolean,
  subEnvironments: Array,
  rootEnvironment: Environment | null,
  selectedEnvironmentId: string | null,
};

const SidebarListItem = SortableElement(
  ({ environment, activeEnvironment, showEnvironment, changeEnvironmentName }) => {
    const classes = classnames({
      'env-modal__sidebar-item': true,
      'env-modal__sidebar-item--active': activeEnvironment === environment,

      // Specify theme because dragging will pull it out to 
      'theme--dialog': true,
    });

    return (
      <li>
        <button value="{environment}">
          <i>
          {environment.color ? (
            <i style="{{">
          ) : (</i></i></button></li>