Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
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,
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 = {
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) => ;
BaseToolbarExample.propTypes = Toolbar.propTypes;
BaseToolbarExample.defaultProps = {
...Toolbar.defaultProps,
nav: <button>menu</button>,
title: 'Page title',
actions: [
<button>search</button>,
,
],
};
export default BaseToolbarExample;