From f8a3e57ab04af5658cb48aaa3fded31126bdaa8b Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Mon, 1 Feb 2021 18:25:55 -0500 Subject: gradient --- src/components/notifications/Notification.tsx | 6 ++++-- src/constants/constants.ts | 4 ++++ src/types/types.ts | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/notifications/Notification.tsx b/src/components/notifications/Notification.tsx index fc3119ed..28a5d912 100644 --- a/src/components/notifications/Notification.tsx +++ b/src/components/notifications/Notification.tsx @@ -2,7 +2,9 @@ import {useNavigation} from '@react-navigation/native'; import React, {useEffect, useState} from 'react'; import {Alert, Image, StyleSheet, Text, View} from 'react-native'; import {TouchableWithoutFeedback} from 'react-native-gesture-handler'; +import LinearGradient from 'react-native-linear-gradient'; import {useDispatch, useStore} from 'react-redux'; +import {BACKGROUND_GRADIENT_MAP} from '../../constants'; import {ERROR_DELETED_OBJECT} from '../../constants/strings'; import { loadImageFromURL, @@ -199,7 +201,7 @@ const Notification: React.FC = (props) => { }; return ( - <> + @@ -232,7 +234,7 @@ const Notification: React.FC = (props) => { )} - + ); }; diff --git a/src/constants/constants.ts b/src/constants/constants.ts index ad43c337..7fcc457f 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -130,6 +130,10 @@ export const BACKGROUND_GRADIENT_MAP: Record< > = { [BackgroundGradientType.Light]: ['#9F00FF', '#27EAE9'], [BackgroundGradientType.Dark]: ['#421566', '#385D5E'], + [BackgroundGradientType.Notification]: [ + 'rgba(143, 1, 255, 0.5)', + 'rgba(110, 231, 231, 0.5)', + ], }; export const CLASS_YEAR_LIST: Array = [ diff --git a/src/types/types.ts b/src/types/types.ts index b014aa2e..f1ba12f4 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -165,6 +165,7 @@ export enum CategorySelectionScreenType { export enum BackgroundGradientType { Light, Dark, + Notification } /** -- cgit v1.2.3-70-g09d2