How to use the react-md/lib/Toolbars.propTypes function in react-md

To help you get started, we’ve selected a few react-md 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 mlaursen / react-md / docs / src / shared / components / ReactMD / toolbars / BaseToolbarExample.jsx View on Github external
import React from 'react';
import Toolbar from 'react-md/lib/Toolbars';
import Button from 'react-md/lib/Buttons/Button';
import MenuButton from 'react-md/lib/Menus/MenuButton';

const BaseToolbarExample = (props) => ;

BaseToolbarExample.propTypes = Toolbar.propTypes;
BaseToolbarExample.defaultProps = {
  ...Toolbar.defaultProps,
  nav: <button>menu</button>,
  title: 'Page title',
  actions: [
    <button>search</button>,
    
      more_vert
    ,
  ],
};

export default BaseToolbarExample;
github mlaursen / react-md / docs / src / shared / components / PhoneSizeDemo / PhoneSizeDemo.jsx View on Github external
import ClosePhoneSizeDemoButton from './ClosePhoneSizeDemoButton';

export default class PhoneSizeDemo extends PureComponent {
  static propTypes = {
    style: PropTypes.object,
    className: PropTypes.string,
    contentStyle: PropTypes.object,
    contentClassName: PropTypes.string,
    contentProps: PropTypes.object,
    toolbarStyle: PropTypes.object,
    toolbarClassName: PropTypes.string,

    title: PropTypes.string.isRequired,
    iconLeft: PropTypes.node,
    toolbar: PropTypes.bool,
    toolbarActions: Toolbar.propTypes.actions,
    toolbarZDepth: PropTypes.number,
    toolbarProminent: PropTypes.bool,
    toolbarProminentTitle: PropTypes.bool,

    mobile: PropTypes.bool,

    /**
     * If this is true, only a mobile device (not tablet or desktop) will be phone-sized.
     * This means that the children will be displayed as-is for tablet and desktop and in
     * a dialog for mobile devices.
     */
    mobileOnly: PropTypes.bool,
    contentComponent: PropTypes.oneOfType([
      PropTypes.func,
      PropTypes.string,
    ]).isRequired,
github mlaursen / react-md / documentation / src / components / PhoneEmulator / PhoneEmulator.jsx View on Github external
contentComponent: PropTypes.oneOfType([
    PropTypes.func,
    PropTypes.string,
  ]).isRequired,
  transitionContent: PropTypes.bool,
  contentId: PropTypes.string,
  contentTransitionName: PropTypes.string,
  contentTransitionEnterTimeout: PropTypes.number,
  contentTransitionLeaveTimeout: PropTypes.number,

  /**
   * Boolean if a toolbar should appear in the phone emulator demo.
   */
  toolbar: PropTypes.bool,
  toolbarTitle: PropTypes.node,
  toolbarActions: Toolbar.propTypes.actions,
  toolbarZDepth: PropTypes.number,
  toolbarProminent: PropTypes.bool,
  toolbarProminentTitle: PropTypes.bool,
  toolbarNavIcon: PropTypes.node,

  /**
   * Boolean if the emulator should appear only on mobile devices. When this is enabled,
   * the children will be displayed as-is instead of in the emulator.
   */
  mobileOnly: PropTypes.bool,
  tabsDemo: PropTypes.bool,
  mobile: PropTypes.bool,
  children: PropTypes.node,
};

PhoneEmulator.defaultProps = {
github mlaursen / react-md / documentation / src / shared / components / toolbars / BaseToolbarExample.jsx View on Github external
import React from 'react';
import Toolbar from 'react-md/lib/Toolbars';
import Button from 'react-md/lib/Buttons/Button';
import ListItem from 'react-md/lib/Lists/ListItem';
import MenuButton from 'react-md/lib/Menus/MenuButton';

const BaseToolbarExample = (props) =&gt; ;

BaseToolbarExample.propTypes = Toolbar.propTypes;
BaseToolbarExample.defaultProps = {
  ...Toolbar.defaultProps,
  nav: <button>menu</button>,
  title: 'Page title',
  actions: [
    <button>search</button>,
    
      
      
      
    ,
  ],
};

export default BaseToolbarExample;