-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
PopupMenuPage.tsx
25 lines (22 loc) · 1.1 KB
/
PopupMenuPage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import * as React from 'react';
import { IPageSectionProps, Markdown } from '@uifabric/example-app-base/lib/index2';
import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
import { PopupMenuPageProps } from './PopupMenuPage.doc';
import { Platforms } from '../../../interfaces/Platforms';
const baseUrl = 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/apps/fabric-website/src/pages/Controls/PopupMenuPage/';
export const PopupMenuPage: React.StatelessComponent<IControlsPageProps> = props => {
const { platform } = props;
return <ControlsAreaPage {...props} {...PopupMenuPageProps[platform]} otherSections={_otherSections(platform) as IPageSectionProps[]} />;
};
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
switch (platform) {
case 'ios':
return [
{
sectionName: 'Implementation',
editUrl: baseUrl + 'docs/ios/PopupMenuImplementation.md',
content: require('!raw-loader!@uifabric/fabric-website/src/pages/Controls/PopupMenuPage/docs/ios/PopupMenuImplementation.md') as string
}
];
}
}