Skip to content

Commit

Permalink
Show theme.colors tokens in the ColorTokensTest
Browse files Browse the repository at this point in the history
  • Loading branch information
lyzhan7 committed Aug 9, 2023
1 parent 4356fe0 commit f71a294
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ import type { ViewStyle, ColorValue } from 'react-native';
import { View, StyleSheet, Platform } from 'react-native';

import { Text, ToggleButton } from '@fluentui/react-native';
import { createAliasTokens } from '@fluentui-react-native/default-theme';
import type { SvgIconProps } from '@fluentui-react-native/icon';
import { globalTokens } from '@fluentui-react-native/theme-tokens';
import type { Theme } from '@fluentui-react-native/theme-types';
import { useTheme } from '@fluentui-react-native/theme-types';
import { themedStyleSheet } from '@fluentui-react-native/themed-stylesheet';
import { getCurrentAppearance } from '@fluentui-react-native/theming-utils';
import { createOfficeAliasTokens } from '@fluentui-react-native/win32-theme';
import type { SvgProps } from 'react-native-svg';
import Svg, { G, Path } from 'react-native-svg';

Expand Down Expand Up @@ -93,16 +90,7 @@ const getSwatch = (item) => {
const AliasColorTokensSwatchList: React.FunctionComponent = () => {
const theme = useTheme();

const isOfficeTheme =
theme.name === 'White' ||
theme.name === 'Colorful' ||
theme.name === 'DarkGray' ||
theme.name === 'Black' ||
theme.name === 'HighContrast';

const aliasColorTokens = isOfficeTheme
? createOfficeAliasTokens(theme.name)
: createAliasTokens(getCurrentAppearance(theme.host.appearance, 'light'));
const aliasColorTokens = theme.colors;

const aggregator = React.useCallback(
(colorName: string) => {
Expand Down

0 comments on commit f71a294

Please sign in to comment.