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';\nimport {\n Label,\n Pivot,\n PivotItem,\n PivotLinkFormat,\n PivotLinkSize\n} from '../../../../index';\n\nexport class PivotOnChangeExample extends React.Component<any, any> {\n public render() {\n return (\n <div>\n <Pivot linkSize={ PivotLinkSize.large } linkFormat={ PivotLinkFormat.tabs } onLinkClick={ this.onLinkClick.bind(this) }>\n <PivotItem linkText='Foo'>\n <Label>Pivot #1</Label>\n </PivotItem>\n <PivotItem linkText='Bar'>\n <Label>Pivot #2</Label>\n </PivotItem>\n <PivotItem linkText='Bas'>\n <Label>Pivot #3</Label>\n </PivotItem>\n <PivotItem linkText='Biz'>\n <Label>Pivot #4</Label>\n </PivotItem>\n <div>\n content not in a PivotItem\n </div>\n </Pivot>\n </div>\n );\n }\n\n public onLinkClick(item: PivotItem): void {\n alert(item.props.linkText);\n }\n}\n"; });