-
Notifications
You must be signed in to change notification settings - Fork 373
Expand file tree
/
Copy pathuseLegacyColors.ts
More file actions
29 lines (27 loc) · 996 Bytes
/
useLegacyColors.ts
File metadata and controls
29 lines (27 loc) · 996 Bytes
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
import { useMemo } from 'react';
import { useTheme } from 'stream-chat-react-native';
export const useLegacyColors = () => {
const {
theme: { semantics },
} = useTheme();
return useMemo(
() => ({
accent_blue: semantics.accentPrimary,
accent_red: semantics.accentError,
bg_gradient_end: semantics.backgroundCoreSurfaceDefault,
bg_gradient_start: semantics.backgroundCoreSurfaceSubtle,
black: semantics.textPrimary,
button_background: semantics.buttonPrimaryBg,
button_text: semantics.buttonPrimaryTextOnAccent,
grey: semantics.textSecondary,
grey_gainsboro: semantics.borderCoreDefault,
grey_whisper: semantics.backgroundCoreSurfaceDefault,
icon_background: semantics.backgroundCoreElevation1,
overlay: semantics.badgeBgOverlay,
white: semantics.backgroundCoreApp,
white_smoke: semantics.backgroundCoreSurfaceSubtle,
white_snow: semantics.backgroundCoreApp,
}),
[semantics],
);
};