Skip to content

Commit d543651

Browse files
committed
styles [nfc]: Pull out kWarningColor constant
1 parent b63e822 commit d543651

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/message/MentionedUserNotSubscribed.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import * as api from '../api';
1111
import ZulipButton from '../common/ZulipButton';
1212
import ZulipTextIntl from '../common/ZulipTextIntl';
1313
import { getAuth } from '../selectors';
14+
import { kWarningColor } from '../styles/constants';
1415

1516
type Props = $ReadOnly<{|
1617
user: UserOrBot,
@@ -23,7 +24,7 @@ const styles = createStyleSheet({
2324
flexDirection: 'row',
2425
alignItems: 'center',
2526
justifyContent: 'space-around',
26-
backgroundColor: 'hsl(40, 100%, 60%)', // Material warning-color
27+
backgroundColor: kWarningColor,
2728
paddingHorizontal: 16,
2829
paddingVertical: 8,
2930
},

src/settings/NotificationsScreen.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { useAppState } from '../reactNativeUtils';
1818
import { IconAlertTriangle } from '../common/Icons';
1919
import type { LocalizableText } from '../types';
2020
import { TranslationContext } from '../boot/TranslationProvider';
21+
import { kWarningColor } from '../styles/constants';
2122

2223
const {
2324
ZLPConstants,
@@ -176,7 +177,7 @@ export default function NotificationsScreen(props: Props): Node {
176177
systemSettingsWarnings.length > 0
177178
? {
178179
Component: IconAlertTriangle,
179-
color: 'hsl(40, 100%, 60%)', // Material warning-color
180+
color: kWarningColor,
180181
}
181182
: undefined
182183
}

src/styles/constants.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ export const HIGHLIGHT_COLOR: string = Color(BRAND_COLOR).fade(0.5).toString();
1818

1919
export const HALF_COLOR = 'hsla(0, 0%, 50%, 0.5)';
2020
export const QUARTER_COLOR = 'hsla(0, 0%, 50%, 0.25)';
21+
22+
// Material warning color
23+
export const kWarningColor = 'hsl(40, 100%, 60%)';

0 commit comments

Comments
 (0)