How to use @vx/responsive - 8 common examples

To help you get started, we’ve selected a few @vx/responsive 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 williaster / data-ui / packages / demo / examples / 06-event-flow / index.jsx View on Github external
import React from 'react';
import { withScreenSize } from '@vx/responsive';

import { App } from '@data-ui/event-flow';
import sampleEvents from '@data-ui/event-flow/build/sampleEvents';

// forms require this import
import '@data-ui/forms/build/react-select.min.css';

import readme from '../../node_modules/@data-ui/event-flow/README.md';

const ResponsiveVis = withScreenSize(({ screenWidth, screenHeight, ...rest }) => (
  
));

export default {
  usage: readme,
  // one example per dataset
  examples: Object.keys(sampleEvents).map(name => {
    const dataset = sampleEvents[name];

    return {
      description: name,
      example: () => ,
    };
  }),
};
github blockkeeper / blockkeeper-frontend-web / src / view / Lib.js View on Github external
backgroundColor: 'transparent',
              color: theme.palette.text.secondary,
              fontFamily: theme.typography.fontFamily,
              width: 300,
              textAlign: 'center',
              boxShadow: 'none'
            }}
            >
            {__.formatTime(new Date((tooltipData || data[data.length - 1])[0] * 1000), hour ? 'DD. MMM YYYY HH:mm' : 'DD. MMM YYYY')}
          
        
      
    )
  }
}
const AreaTooltip = withParentSize(withTooltip(Area))

export {
  setBxpTrigger,
  unsetBxpTrigger,
  TopBar,
  TscListAddr,
  TscListAddresses,
  DepotEmpty,
  SoonMsg,
  PortfolioTab,
  PaperGrid,
  SubBar,
  Jumbo,
  BrowserGate,
  BrowserGateSafarimobile,
  NtAllwd,
github zooniverse / front-end-monorepo / packages / lib-classifier / src / components / Classifier / components / SubjectViewer / components / BarChartViewer / BarChartViewer.js View on Github external
value: PropTypes.number.isRequired
  })).isRequired,
  margin: PropTypes.shape({
    bottom: PropTypes.number,
    left: PropTypes.number,
    right: PropTypes.number,
    top: PropTypes.number
  }),
  parentHeight: PropTypes.number.isRequired,
  parentWidth: PropTypes.number.isRequired,
  theme: PropTypes.object,
  xAxisLabel: PropTypes.string,
  yAxisLabel: PropTypes.string
}

export default withTheme(withParentSize(BarChartViewer))
export { BarChartViewer }
github zooniverse / front-end-monorepo / packages / lib-classifier / src / components / Classifier / components / SubjectViewer / components / ScatterPlotViewer / ScatterPlotViewer.js View on Github external
global: {
      colors: {},
      font: {}
    }
  },
  zooming: false
}

ScatterPlotViewer.propTypes = {
  theme: PropTypes.object,
  parentHeight: PropTypes.number.isRequired,
  parentWidth: PropTypes.number.isRequired,
  zooming: PropTypes.bool
}

export default withParentSize(withTheme(ScatterPlotViewer))
export { ScatterPlotViewer }
github gkunthara / Crypto-Chart / src / Chart.js View on Github external
fontSize={11}
                                            textAnchor="middle"
                                            fontFamily="Roboto"
                                        />
                                    }
                                />
                            
                        
                
        );
    }


}

export default withParentSize(Chart);
github blockkeeper / blockkeeper-frontend-web / src / view / Lib.js View on Github external
fill={arc.data.color}
                  fontSize={theme.typography.caption.fontSize * 1.3}
                >
                  ●
                
                 
                {arc.data.label}
              
            }}
          />
        
      
    )
  }
}
const Doughnut = withParentSize(DoughnutOrig)

const DepotDoughnut = ({
  doughnutClassName,
  doughnutData,
  letters,
  width,
  height,
  radius
}) =>
  <div>
    
  </div>
github hshoff / viewsource / components / ethereum / chart / Chart.js View on Github external
time={activeBucket.closeTime}
            /&gt;
            <details>
          }
      
    );
  }
}

export default withParentSize(withTooltip(Chart));
</details>
github hshoff / viewsource / components / ethereum / banner / Banner.js View on Github external
import { withParentSize } from '@vx/responsive';

const Logo = withParentSize(function({ parentWidth, parentHeight }) {
  const margin = {
    top: 5,
    bottom: 5,
    right: 22,
    left: 22
  };
  const width = parentWidth - margin.left - margin.right;
  const wCenter = parentWidth / 2;
  const hCenter = parentHeight / 2;
  const topCenter = hCenter - hCenter * 0.25;
  const bottomCenter = hCenter + hCenter * 0.25;
  return (
    <svg height="{parentHeight}" width="{parentWidth}">
      <g fill="#ff6f88">
        </g></svg>

@vx/responsive

vx responsive svg

MIT
Latest version published 4 years ago

Package Health Score

78 / 100
Full package analysis