module.exports = "import * as React from 'react';\r\nimport { ContextualMenu, DirectionalHint, Button, getRTL, IconName } from '../../../../index';\r\nimport './ContextualMenuExample.scss';\r\n\r\nexport class ContextualMenuHeaderExample extends React.Component<any, any> {\r\n\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      isContextMenuVisible: false\r\n    };\r\n    this._onClick = this._onClick.bind(this);\r\n    this._onDismiss = this._onDismiss.bind(this);\r\n  }\r\n\r\n  public render() {\r\n\r\n    return (\r\n      <div>\r\n        <Button onClick={ this._onClick } id='ContextualMenuButton1'> Click for ContextualMenu </Button>\r\n        { this.state.isContextMenuVisible ? (\r\n          <ContextualMenu\r\n            shouldFocusOnMount={ true }\r\n            target={ this.state.target }\r\n            onDismiss={ this._onDismiss }\r\n            directionalHint={ getRTL() ? DirectionalHint.bottomRightEdge : DirectionalHint.bottomLeftEdge }\r\n            items={\r\n              [\r\n                {\r\n                  key: 'Actions',\r\n                  itemType: 2,\r\n                  name: 'Actions'\r\n                },\r\n                {\r\n                  key: 'upload',\r\n                  iconProps: {\r\n                    iconName: IconName.Upload,\r\n                    style: {\r\n                      color: 'salmon'\r\n                    }\r\n                  },\r\n                  name: 'Upload',\r\n                  title: 'Upload a file'\r\n                },\r\n                {\r\n                  key: 'rename',\r\n                  name: 'Rename'\r\n                },\r\n                {\r\n                  key: 'share',\r\n                  iconProps: {\r\n                    iconName: IconName.Share\r\n                  },\r\n                  subMenuProps: {\r\n                    items: [\r\n                      {\r\n                        key: 'sharetoemail',\r\n                        name: 'Share to Email',\r\n                        iconProps: {\r\n                          iconName: IconName.Mail\r\n                        },\r\n                      },\r\n                      {\r\n                        key: 'sharetofacebook',\r\n                        name: 'Share to Facebook',\r\n                      },\r\n                      {\r\n                        key: 'sharetotwitter',\r\n                        name: 'Share to Twitter',\r\n                        iconProps: {\r\n                          iconName: IconName.Share\r\n                        },\r\n                      },\r\n                    ],\r\n                  },\r\n                  name: 'Sharing'\r\n                },\r\n                {\r\n                  key: 'navigation',\r\n                  itemType: 2,\r\n                  name: 'Navigation'\r\n                },\r\n                {\r\n                  key: 'properties',\r\n                  name: 'Properties'\r\n                },\r\n                {\r\n                  key: 'print',\r\n                  iconProps: {\r\n                    iconName: IconName.Print\r\n                  },\r\n                  name: 'Print'\r\n                },\r\n\r\n                {\r\n                  key: 'Bing',\r\n                  name: 'Go to Bing',\r\n                  href: 'http://www.bing.com'\r\n                },\r\n              ]\r\n            }\r\n            />) : (null) }\r\n      </div>\r\n    );\r\n  }\r\n\r\n  private _onClick(event: React.MouseEvent<any>) {\r\n    this.setState({ target: event.target, isContextMenuVisible: true });\r\n  }\r\n\r\n  private _onDismiss(event: any) {\r\n    this.setState({ isContextMenuVisible: false });\r\n  }\r\n}\r\n";