🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

vitessce-grid

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vitessce-grid

A simplified wrapper for react-grid-layout inspired by HiGlass viewconfigs

latest
Source
npmnpm
Version
0.0.10
Version published
Weekly downloads
527
2295.45%
Maintainers
3
Weekly downloads
 
Created
Source

vitessce-grid

A simplified wrapper for react-grid-layout, inspired by HiGlass viewconfigs. Features:

  • Easier specification of column positions and widths.
  • Grid heights and widths calculated to fill window.
  • Specify the React component that should fill each pane.

Example

For more details, see the demo code.

  • layout: The layout, and the React components which should fill it.
  • getComponent: Given a string, returns the actual React component.
  • draggableHandle: A CSS path.
  • padding, margin: Optional.
  • reactGridLayoutProps: Pass other properties through to react-grid-layout.
  • onAllReady: Called after all components have called onReady.
function getComponent(name) { ... }
const responsiveLayout = {
  columns: {
    1200: [0, 5, 10, 12], ...
  },
  layout: [
    { component: 'Demo',
      props: { text: 'header' },
      x: 0, y: 0, w: 2 },
    { component: 'Demo',
      props: { text: 'sidebar' },
      x: 2, y: 0, h: 3 },
    ...
  ],
};
ReactDOM.render(
  <VitessceGrid
    layout={responsiveLayout}
    getComponent={getComponent}
    draggableHandle={`.${handleClass}`}
    padding={50}
    margin={25}
    onAllReady={onAllReady}
    reactGridLayoutProps={{ ... }}
  />,
  document.getElementById('demo'),
);

Keywords

react-component

FAQs

Package last updated on 03 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts