How to use victory-cursor-container - 3 common examples

To help you get started, we’ve selected a few victory-cursor-container 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 FormidableLabs / victory-native / lib / components / victory-cursor-container.js View on Github external
const nativeCursorMixin = (base) => class VictoryNativeCursorContainer extends base {
  static displayName = "VictoryCursorContainer";
  // assign native specific defaultProps over web `VictoryCursorContainer` defaultProps
  static defaultProps = {
    ...VictoryCursorContainer.defaultProps,
    cursorLabelComponent: ,
    cursorComponent: 
  };

  // overrides all web events with native specific events
  static defaultEvents = (props) => {
    return [{
      target: "parent",
      eventHandlers: {
        onTouchStart: (evt, targetProps) => {
          return props.disable ? {} : CursorHelpers.onMouseMove(evt, targetProps);
        },
        onTouchMove: (evt, targetProps) => {
          return props.disable ? {} : CursorHelpers.onMouseMove(evt, targetProps);
        },
        onTouchEnd: (evt, targetProps) => {
github FormidableLabs / victory-native / lib / components / victory-cursor-container.js View on Github external
onTouchMove: (evt, targetProps) => {
          return props.disable ? {} : CursorHelpers.onMouseMove(evt, targetProps);
        },
        onTouchEnd: (evt, targetProps) => {
github FormidableLabs / victory-native / lib / components / victory-cursor-container.js View on Github external
onTouchEnd: (evt, targetProps) => {
          return props.disable ? {} : CursorHelpers.onTouchEnd(evt, targetProps);
        }
      }

victory-cursor-container

Interactive Cursor Component for Victory

MIT
Latest version published 3 days ago

Package Health Score

98 / 100
Full package analysis