-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
PersonaPage.tsx
51 lines (47 loc) · 1.64 KB
/
PersonaPage.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import * as React from 'react';
import { IPageSectionProps, Markdown } from '@uifabric/example-app-base/lib/index2';
import { ControlsAreaPage, IControlsPageProps } from '../ControlsAreaPage';
import { PersonaPageProps } from './PersonaPage.doc';
import { Platforms } from '../../../interfaces/Platforms';
const baseUrl = 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/apps/fabric-website/src/pages/Controls/PersonaPage/';
export const PersonaPage: React.StatelessComponent<IControlsPageProps> = props => {
const { platform } = props;
return (
<ControlsAreaPage
{...props}
title="Persona"
{...PersonaPageProps[platform]}
otherSections={_otherSections(platform) as IPageSectionProps[]}
/>
);
};
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
switch (platform) {
case 'ios':
return [
{
sectionName: 'Implementation',
editUrl: baseUrl + 'docs/ios/PersonaImplementation.md',
content: (
<Markdown>
{require('!raw-loader!@uifabric/fabric-website/src/pages/Controls/PersonaPage/docs/ios/PersonaImplementation.md') as string}
</Markdown>
)
}
];
case 'android':
return [
{
sectionName: 'Implementation',
editUrl: baseUrl + 'docs/android/PersonaImplementation.md',
content: (
<Markdown>
{
require('!raw-loader!@uifabric/fabric-website/src/pages/Controls/PersonaPage/docs/android/PersonaImplementation.md') as string
}
</Markdown>
)
}
];
}
}