How to use the @material-ui/utils.exactProp function in @material-ui/utils

To help you get started, we’ve selected a few @material-ui/utils 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 mui-org / material-ui / packages / material-ui / src / NoSsr / NoSsr.js View on Github external
*/
  children: PropTypes.node.isRequired,
  /**
   * If `true`, the component will not only prevent server-side rendering.
   * It will also defer the rendering of the children into a different screen frame.
   */
  defer: PropTypes.bool,
  /**
   * The fallback content to display.
   */
  fallback: PropTypes.node,
};

if (process.env.NODE_ENV !== 'production') {
  // eslint-disable-next-line
  NoSsr['propTypes' + ''] = exactProp(NoSsr.propTypes);
}

export default NoSsr;
github mui-org / material-ui / packages / material-ui / src / Portal / Portal.js View on Github external
/**
   * Disable the portal behavior.
   * The children stay within it's parent DOM hierarchy.
   */
  disablePortal: PropTypes.bool,
  /**
   * Callback fired once the children has been mounted into the `container`.
   *
   * This prop will be deprecated and removed in v5, the ref can be used instead.
   */
  onRendered: PropTypes.func,
};

if (process.env.NODE_ENV !== 'production') {
  // eslint-disable-next-line
  Portal['propTypes' + ''] = exactProp(Portal.propTypes);
}

export default Portal;
github mui-org / material-ui / packages / material-ui / src / CssBaseline / CssBaseline.js View on Github external
function CssBaseline(props) {
  const { children = null } = props;
  useStyles();
  return {children};
}

CssBaseline.propTypes = {
  /**
   * You can wrap a node.
   */
  children: PropTypes.node,
};

if (process.env.NODE_ENV !== 'production') {
  // eslint-disable-next-line
  CssBaseline['propTypes' + ''] = exactProp(CssBaseline.propTypes);
}

export default CssBaseline;
github mui-org / material-ui / packages / material-ui / src / ClickAwayListener / ClickAwayListener.js View on Github external
* The mouse event to listen to. You can disable the listener by providing `false`.
   */
  mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]),
  /**
   * Callback fired when a "click away" event is detected.
   */
  onClickAway: PropTypes.func.isRequired,
  /**
   * The touch event to listen to. You can disable the listener by providing `false`.
   */
  touchEvent: PropTypes.oneOf(['onTouchStart', 'onTouchEnd', false]),
};

if (process.env.NODE_ENV !== 'production') {
  // eslint-disable-next-line
  ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);
}

export default ClickAwayListener;
github mui-org / material-ui / packages / material-ui / src / Hidden / HiddenJs.js View on Github external
/**
   * If `true`, screens this size and up will be hidden.
   */
  xlUp: PropTypes.bool,
  /**
   * If `true`, screens this size and down will be hidden.
   */
  xsDown: PropTypes.bool,
  /**
   * If `true`, screens this size and up will be hidden.
   */
  xsUp: PropTypes.bool,
};

if (process.env.NODE_ENV !== 'production') {
  HiddenJs.propTypes = exactProp(HiddenJs.propTypes);
}

export default withWidth()(HiddenJs);
github mui-org / material-ui / packages / material-ui-styles / src / ThemeProvider / ThemeProvider.js View on Github external
return {children};
}

ThemeProvider.propTypes = {
  /**
   * Your component tree.
   */
  children: PropTypes.node.isRequired,
  /**
   * A theme object. You can provide a function to extend the outer theme.
   */
  theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,
};

if (process.env.NODE_ENV !== 'production') {
  ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes);
}

export default ThemeProvider;
github mui-org / material-ui / packages / material-ui-docs / src / NProgressBar / NProgressBar.js View on Github external
*/
function NProgressBar(props) {
  return (
    
      {props.children}
      
    
  );
}

NProgressBar.propTypes = {
  children: PropTypes.node,
};

if (process.env.NODE_ENV !== 'production') {
  NProgressBar.propTypes = exactProp(NProgressBar.propTypes);
}

export default NProgressBar;
github mui-org / material-ui / packages / material-ui-styles / src / StylesProvider / StylesProvider.js View on Github external
*
   * The sheetsManager is used to deduplicate style sheet injection in the page.
   * It's deduplicating using the (theme, styles) couple.
   * On the server, you should provide a new instance for each request.
   */
  sheetsManager: PropTypes.object,
  /**
   * @ignore
   *
   * Collect the sheets.
   */
  sheetsRegistry: PropTypes.object,
};

if (process.env.NODE_ENV !== 'production') {
  StylesProvider.propTypes = exactProp(StylesProvider.propTypes);
}

export default StylesProvider;
github mui-org / material-ui / packages / material-ui / src / RootRef / RootRef.js View on Github external
}
}

RootRef.propTypes = {
  /**
   * The wrapped element.
   */
  children: PropTypes.element.isRequired,
  /**
   * A ref that points to the first DOM node of the wrapped element.
   */
  rootRef: refType.isRequired,
};

if (process.env.NODE_ENV !== 'production') {
  RootRef.propTypes = exactProp(RootRef.propTypes);
}

export default RootRef;