office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
1 lines • 1.07 kB
JavaScript
define([], function() { return "import * as React from 'react';\r\nimport {\r\n Panel,\r\n Button\r\n} from '../../../../index';\r\n\r\nexport class PanelLightDismissExample extends React.Component<any, any> {\r\n\r\n constructor() {\r\n super();\r\n this.state = {\r\n showPanel: false\r\n };\r\n }\r\n\r\n public render() {\r\n return (\r\n <div>\r\n <Button description='Opens the Sample Panel' onClick={ this._showPanel.bind(this) }>Open Panel</Button>\r\n <Panel\r\n isOpen={ this.state.showPanel }\r\n isLightDismiss={ true }\r\n onDismiss= { this._closePanel.bind(this) }\r\n headerText='Light Dismiss Panel'\r\n >\r\n <span className='ms-font-m'>Light Dismiss usage is meant for the Contextual Menu on mobile sized breakpoints.</span>\r\n </Panel>\r\n </div>\r\n );\r\n }\r\n\r\n private _showPanel() {\r\n this.setState( {showPanel: true } );\r\n }\r\n private _closePanel() {\r\n this.setState( {showPanel: false } );\r\n }\r\n}\r\n"; });