How to use the react-md/lib/Drawers.DrawerTypes 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 / documentation / src / shared / components / navigation-drawers / ControlReactMDDrawer.jsx View on Github external
import React, { PureComponent, PropTypes } from 'react';
import { connect } from 'react-redux';
import SelectField from 'react-md/lib/SelectFields';
import { updateDrawerType } from 'actions/ui';

import Drawer from 'react-md/lib/Drawers';
import { isPermanent, isPersistent } from 'react-md/lib/Drawers/isType';
const types = Object.keys(Drawer.DrawerTypes).map(key => Drawer.DrawerTypes[key]);

@connect(({ ui: { drawer: { mobile, tablet } } }) => ({ mobile, tablet }), { updateDrawerType })
export default class ControlReactMDDrawer extends PureComponent {
  static propTypes = {
    mobile: PropTypes.bool.isRequired,
    tablet: PropTypes.bool.isRequired,
    updateDrawerType: PropTypes.func.isRequired,
    className: PropTypes.string,
    children: PropTypes.node,
  };

  componentWillUnmount() {
    this.props.updateDrawerType(undefined);
  }

  render() {
github webdevstar / Dashborad / client / src / components / common / InfoDrawer.tsx View on Github external
>
            {buttonIcon}

          
          {buttonLabel && (
            <span style="{{">
              {buttonLabel}
            </span>
          )}
        
         {}}
          position={'right'}
          type={Drawer.DrawerTypes.FLOATING}
          header={drawerHeader}
          style={{ zIndex: 100, borderLeft: '1px solid lightgray' }}
          onMediaTypeChange={() =&gt; {}} 
        &gt;
          
            {this.props.children}
          
        
      
    );
  }
}
github mlaursen / react-md / docs / src / components / Customization / ThemeBuilder / Preview.jsx View on Github external
<div>
          <h2>Look at this</h2>
          <button id="{`${idPrefix}-btn`}">
            Button
          </button>
        </div>
        }
          navClassName="md-toolbar-relative"
          navItems={NAV_ITEMS}
          visible={this.state.visible}
          onVisibilityChange={this.handleVisibilityChange}
          overlay
          type={Drawer.DrawerTypes.TEMPORARY}
        /&gt;
        <button id="{`${idPrefix}-floating-btn`}">email</button>
      
    );
  }
}
github Azure / ibex-dashboard / client / src / components / common / InfoDrawer.tsx View on Github external
&gt;
            {buttonIcon}

          
          {buttonLabel &amp;&amp; (
            <span style="{{">
              {buttonLabel}
            </span>
          )}
        
         {}}
          position={'right'}
          type={Drawer.DrawerTypes.TEMPORARY}
          header={drawerHeader}
          style={{ zIndex: 100 }}
        &gt;
          
            {this.props.children}
          
        
      
    );
  }
}
github mlaursen / react-md / docs / src / components / SassDocPage / Finder.jsx View on Github external
);

    return (
      {autocomplete}}
        navItems={filteredNavItems}
        autoclose={false}
        navClassName="sassdoc__finder-list"
      /&gt;
    );
  }
}
github turnerniles / react-virtualized-pivot / src / components / Menu / Menu.jsx View on Github external
className={[
          styles['md-divider-border'],
          styles['md-divider-border--bottom'],
        ].join(' ')}
      /&gt;
    );

    return (
      
        {menuItems}
      
    );
  }
}
github strues / boldr / packages / boldr-cms / src / shared / scenes / Profile / Profile.js View on Github external
toggleDrawer={ this._toggleDrawer }
                  handleAvatarImgClick={ this.handleAvatarImgClick }
                  profile={ profile }
                /&gt;
              
            
            
              {this.state.showDropzone === true ? this.renderDropzone() : null}
            
            
              
            
          
        

      
    );
  }
}
github mlaursen / react-md / documentation / src / components / Components / drawers / DrawerWithContent / PhotoDrawer.jsx View on Github external
const PhotoDrawer = ({ visible, onVisibilityChange, photo }) =&gt; (
  
     onVisibilityChange(false)}&gt;close}
      title={photo.filename}
      actions={actions}
      prominentTitle
    /&gt;
    <section>
      
        <img role="presentation" src="{`https://unsplash.it/360/520/?image=${photo.id}`}"></section>