-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
PresencePage.tsx
78 lines (74 loc) · 2.45 KB
/
PresencePage.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import * as React from 'react';
import { Markdown, ColorPalette, IPageSectionProps } from '@uifabric/example-app-base/lib/index2';
import { IStylesPageProps, StylesAreaPage } from '../StylesAreaPage';
import { ColorsPresencePageProps } from './PresencePage.doc';
import { Platforms } from '../../../interfaces/Platforms';
const baseUrl = 'https://github.com/OfficeDev/office-ui-fabric-react/tree/master/apps/fabric-website/src/pages/Styles/Colors/docs';
export const ColorsPresencePage: React.StatelessComponent<IStylesPageProps> = props => {
const { platform } = props;
return (
<StylesAreaPage {...props} {...ColorsPresencePageProps[platform]} otherSections={_otherSections(platform) as IPageSectionProps[]} />
);
};
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
switch (platform) {
case 'web':
return [
{
sectionName: 'Presence',
editUrl: `${baseUrl}/web/ColorsPresence.md`,
content: (
<>
<Markdown>
{require('!raw-loader!@uifabric/fabric-website/src/pages/Styles/Colors/docs/web/ColorsPresence.md') as string}
</Markdown>
<ColorPalette
colors={[
{
name: 'Away',
hex: '#ffaa44',
code: {
core: '$ms-color-sharedOrange10',
react: 'SharedColors.orange10'
}
},
{
name: 'Do Not Disturb',
hex: '#c50f1f'
},
{
name: 'Online',
hex: '#6bb700'
},
{
name: 'Invisible',
hex: '#8a8886'
},
{
name: 'Out of Office',
hex: '#b4009e'
}
]}
/>
</>
)
},
{
sectionName: 'Implementation',
editUrl: `${baseUrl}/web/ColorsImplementation.md`,
content: (
<Markdown>
{require('!raw-loader!@uifabric/fabric-website/src/pages/Styles/Colors/docs/web/ColorsImplementation.md') as string}
</Markdown>
)
}
];
default:
return [
{
sectionName: 'Coming soon',
content: '...'
}
];
}
}