How to use the react-styleguidist/lib/client/consts.DisplayModes.all function in react-styleguidist

To help you get started, we’ve selected a few react-styleguidist 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 vue-styleguidist / vue-styleguidist / packages / vue-styleguidist / src / rsg-components / StyleGuide / StyleGuide.js View on Github external
patterns: PropTypes.array,
		displayMode: PropTypes.string,
		allSections: PropTypes.array.isRequired,
		pagePerSection: PropTypes.bool
	}

	static childContextTypes = {
		codeRevision: PropTypes.number.isRequired,
		config: PropTypes.object.isRequired,
		slots: PropTypes.object.isRequired,
		displayMode: PropTypes.string,
		renderRootJsx: PropTypes.object
	}

	static defaultProps = {
		displayMode: DisplayModes.all
	}

	state = {
		error: false,
		info: null
	}

	getChildContext() {
		return {
			codeRevision: this.props.codeRevision,
			config: this.props.config,
			slots: this.props.slots,
			displayMode: this.props.displayMode,
			renderRootJsx: this.props.renderRootJsx
		}
	}
github quid / refraction / src / components / StyleGuide.js View on Github external
function hasSidebar(displayMode, showSidebar) {
  return (
    displayMode === DisplayModes.notFound ||
    (showSidebar && displayMode === DisplayModes.all)
  );
}
github quid / refraction / src / components / StyleGuide.js View on Github external
welcomeScreen: PropTypes.bool,
    patterns: PropTypes.array,
    displayMode: PropTypes.string,
    allSections: PropTypes.array.isRequired,
    pagePerSection: PropTypes.bool,
  };

  static childContextTypes = {
    codeRevision: PropTypes.number.isRequired,
    config: PropTypes.object.isRequired,
    slots: PropTypes.object.isRequired,
    displayMode: PropTypes.string,
  };

  static defaultProps = {
    displayMode: DisplayModes.all,
  };

  state = {
    error: false,
    info: null,
  };

  getChildContext() {
    return {
      codeRevision: this.props.codeRevision,
      config: this.props.config,
      slots: this.props.slots,
      displayMode: this.props.displayMode,
    };
  }