How to use the @zendeskgarden/react-theming.withTheme function in @zendeskgarden/react-theming

To help you get started, we’ve selected a few @zendeskgarden/react-theming 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 zendeskgarden / react-components / packages / dropdowns / src / Multiselect / Multiselect.tsx View on Github external
/** Applies inset `box-shadow` styling on focus */
  focusInset: PropTypes.bool,
  hovered: PropTypes.bool,
  /** Displays select open state */
  open: PropTypes.bool,
  renderItem: PropTypes.func.isRequired,
  maxItems: PropTypes.number,
  validation: PropTypes.oneOf([VALIDATION.SUCCESS, VALIDATION.WARNING, VALIDATION.ERROR])
};

Multiselect.defaultProps = {
  maxItems: 4
};

/* @component */
export default withTheme(Multiselect) as React.FunctionComponent;
github zendeskgarden / react-components / packages / buttons / src / views / Anchor.js View on Github external
);
});

Anchor.propTypes = {
  /** Apply danger styling */
  danger: PropTypes.bool,
  focused: PropTypes.bool,
  hovered: PropTypes.bool,
  active: PropTypes.bool,
  /* Used when the anchor navigates to an external resource */
  external: PropTypes.bool,
  children: PropTypes.node
};

/** @component */
export default withTheme(Anchor);
github zendeskgarden / react-components / packages / dropdowns / src / Menu / Menu.tsx View on Github external
small: PropTypes.bool,
  hidden: PropTypes.bool,
  arrow: PropTypes.bool,
  maxHeight: PropTypes.string
};

Menu.defaultProps = {
  placement: 'bottom-start',
  animate: true,
  eventsEnabled: true,
  maxHeight: '400px',
  zIndex: 1000
};

/** @component */
export default withTheme(Menu) as React.FunctionComponent;
github zendeskgarden / react-components / packages / menus / src / containers / MenuContainer.js View on Github external
if (appendToNode) {
                  return createPortal(menu, appendToNode);
                }

                return menu;
              }}
            
          )}
        
      
    );
  }
}

export default withTheme(MenuContainer);
github zendeskgarden / react-components / packages / datepickers / src / Datepicker / Datepicker.tsx View on Github external
popperModifiers: PropTypes.any,
  animate: PropTypes.bool,
  eventsEnabled: PropTypes.bool,
  zIndex: PropTypes.number
};

Datepicker.defaultProps = {
  placement: 'bottom-start',
  refKey: 'ref',
  animate: true,
  eventsEnabled: true,
  zIndex: 1000,
  locale: 'en-US'
};

export default withTheme(Datepicker) as FunctionComponent;
github zendeskgarden / react-components / packages / ranges / src / elements / MultiThumbRange.js View on Github external
this.addDragEvents();

                e.preventDefault();
                e.stopPropagation();

                this.maxThumbRef.focus();
              }}
            />
          
        
      
    );
  }
}

export default withTheme(MultiThumbRange);
github zendeskgarden / react-components / packages / buttons / src / components / ButtonGroup.tsx View on Github external
});
  };

  return (
    
      {renderButtons()}
    
  );
};

ButtonGroup.propTypes = {
  selectedItem: PropTypes.any,
  onSelect: PropTypes.func
};

export default withTheme(ButtonGroup);
github zendeskgarden / react-components / packages / dropdowns / src / Dropdown / Dropdown.tsx View on Github external
);
};

Dropdown.propTypes = {
  isOpen: PropTypes.bool,
  selectedItem: PropTypes.any,
  selectedItems: PropTypes.arrayOf(PropTypes.any),
  highlightedIndex: PropTypes.number,
  inputValue: PropTypes.string,
  onSelect: PropTypes.func,
  onStateChange: PropTypes.func,
  downshiftProps: PropTypes.object
};

export default withTheme(Dropdown) as React.FunctionComponent;
github zendeskgarden / react-components / packages / modals / src / containers / FocusJailContainer.js View on Github external
containerRef = reference => {
    this.container = reference;
  };

  render() {
    const { children, render = children } = this.props;

    return render({
      getContainerProps: this.getContainerProps,
      containerRef: this.containerRef
    });
  }
}

export default withTheme(FocusJailContainer);
github zendeskgarden / react-components / packages / forms / src / fields / MultiThumbRange.js View on Github external
minValue: PropTypes.number,
  maxValue: PropTypes.number,
  step: PropTypes.number,
  onChange: PropTypes.func
};

MultiThumbRange.defaultProps = {
  min: 0,
  max: 100,
  minValue: 0,
  maxValue: 100,
  step: 1
};

/** @component */
export default withTheme(MultiThumbRange);