|
1 |
| -import type { PartialTheme, Theme, ThemeOptions } from '@fluentui-react-native/framework'; |
| 1 | +import type { PartialTheme, ThemeOptions } from '@fluentui-react-native/framework'; |
2 | 2 | import { createOfficeTheme, getThemingModule } from '@fluentui-react-native/win32-theme';
|
3 | 3 |
|
4 |
| -export type ThemeNames = 'Default' | 'Office' | 'Caterpillar' | 'Apple'; |
| 4 | +export type ThemeNames = 'Default' | 'Office' | 'Apple'; |
5 | 5 |
|
6 | 6 | export const themeChoices = [
|
7 | 7 | { label: 'Default', value: 'Default' },
|
8 | 8 | { label: 'Office', value: 'Office' },
|
9 |
| - { label: 'Caterpillar', value: 'Caterpillar' }, |
10 | 9 | ];
|
11 | 10 |
|
12 |
| -function applyCaterpillarTheme(parent: Theme): PartialTheme { |
13 |
| - return parent.host?.appearance === 'dark' |
14 |
| - ? { |
15 |
| - colors: { |
16 |
| - buttonBackground: '#111111', |
17 |
| - buttonBackgroundHovered: '#ffcd11', |
18 |
| - buttonBackgroundPressed: '#eeeeee', |
19 |
| - buttonText: '#ffffff', |
20 |
| - buttonTextPressed: '#111111', |
21 |
| - buttonTextHovered: '#000000', |
22 |
| - }, |
23 |
| - components: { |
24 |
| - Button: { |
25 |
| - borderWidth: 0, |
26 |
| - tokens: { |
27 |
| - borderWidth: 0, |
28 |
| - }, |
29 |
| - }, |
30 |
| - }, |
31 |
| - } |
32 |
| - : { |
33 |
| - colors: { |
34 |
| - buttonBackground: '#ffcd11', |
35 |
| - buttonBackgroundHovered: '#111111', |
36 |
| - buttonBackgroundPressed: '#eeeeee', |
37 |
| - buttonText: '#000000', |
38 |
| - buttonTextPressed: '#111111', |
39 |
| - buttonTextHovered: '#ffffff', |
40 |
| - }, |
41 |
| - components: { |
42 |
| - Button: { |
43 |
| - borderWidth: 0, |
44 |
| - tokens: { |
45 |
| - borderWidth: 0, |
46 |
| - }, |
47 |
| - }, |
48 |
| - }, |
49 |
| - }; |
50 |
| -} |
51 |
| - |
52 | 11 | const themingModule = getThemingModule()[0];
|
53 | 12 |
|
54 | 13 | /** apply the currently active theme layering */
|
55 |
| -export function applyTheme(parent: Theme, name: ThemeNames, appearance: ThemeOptions['appearance']): PartialTheme { |
| 14 | +export function applyTheme(name: ThemeNames, appearance: ThemeOptions['appearance']): PartialTheme { |
56 | 15 | switch (name) {
|
57 | 16 | case 'Office':
|
58 | 17 | return themingModule ? createOfficeTheme({ appearance, paletteName: 'Dialogs_FluentSV' }).theme : {};
|
59 |
| - case 'Caterpillar': |
60 |
| - return applyCaterpillarTheme(parent); |
61 | 18 | default:
|
62 | 19 | return {};
|
63 | 20 | }
|
|
0 commit comments