office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
1 lines • 944 B
JavaScript
module.exports = "import * as React from 'react';\nimport {\n Panel,\n PanelType,\n Button\n} from '../../../../index';\n\nexport class PanelSmallFluidExample extends React.Component<any, any> {\n\n constructor() {\n super();\n this.state = {\n showPanel: false\n };\n }\n\n public render() {\n return (\n <div>\n <Button description='Opens the Sample Panel' onClick={ this._showPanel.bind(this) }>Open Panel</Button>\n <Panel\n isOpen={ this.state.showPanel }\n type={ PanelType.smallFluid }\n onDismiss= { this._closePanel.bind(this) }\n headerText='Panel - Small, right-aligned, fixed'\n >\n <span className='ms-font-m'>Content goes here.</span>\n </Panel>\n </div>\n );\n }\n\n private _showPanel() {\n this.setState( {showPanel: true } );\n }\n private _closePanel() {\n this.setState( {showPanel: false } );\n }\n}\n";