How to use the hig-vanilla.Themes.AvailableThemes function in hig-vanilla

To help you get started, we’ve selected a few hig-vanilla 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 Autodesk / hig / packages / react / src / adapters / HIGAdapter / HIGAdapter.js View on Github external
import React, { Component } from "react";
import PropTypes from "prop-types";
import { Themes } from "hig-vanilla";
import "hig-vanilla/lib/hig.css";
import HIGPropTypes from "./HIGPropTypes";

class HIGAdapter extends Component {
  static propTypes = {
    children: PropTypes.func,
    HIGConstructor: PropTypes.func.isRequired,
    displayName: PropTypes.string.isRequired,
    higInstance: HIGPropTypes.higInstance,
    higTheme: PropTypes.oneOf(Themes.AvailableThemes)
  };

  static contextTypes = {
    higParent: PropTypes.object,
    higTheme: PropTypes.oneOf(Themes.AvailableThemes)
  };

  static childContextTypes = {
    higTheme: PropTypes.oneOf(Themes.AvailableThemes)
  };

  static defaultProps = {
    children: () => {},
    higInstance: undefined
  };
github Autodesk / hig / packages / react / src / adapters / HIGAdapter / HIGAdapter.js View on Github external
class HIGAdapter extends Component {
  static propTypes = {
    children: PropTypes.func,
    HIGConstructor: PropTypes.func.isRequired,
    displayName: PropTypes.string.isRequired,
    higInstance: HIGPropTypes.higInstance,
    higTheme: PropTypes.oneOf(Themes.AvailableThemes)
  };

  static contextTypes = {
    higParent: PropTypes.object,
    higTheme: PropTypes.oneOf(Themes.AvailableThemes)
  };

  static childContextTypes = {
    higTheme: PropTypes.oneOf(Themes.AvailableThemes)
  };

  static defaultProps = {
    children: () => {},
    higInstance: undefined
  };

  constructor(props) {
    super(props);
    this.state = {
      higInstance: props.higInstance || new props.HIGConstructor({}),
      mounted: false
    };
  }

  getChildContext() {