From 018b045a1e747d7c9a652bfef1db006a40f973ad Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Thu, 3 Jun 2021 17:28:16 +1000 Subject: [PATCH] Fix icon color in light mode --- .../src/components/GoogleCalendar/GoogleCalendar.tsx | 2 +- .../src/components/GoogleCalendar/googleCalendarStyle.ts | 4 ++++ .../src/components/OutlookCalendar/OutlookCalendar.tsx | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/crabfit-frontend/src/components/GoogleCalendar/GoogleCalendar.tsx b/crabfit-frontend/src/components/GoogleCalendar/GoogleCalendar.tsx index b1517a0..74f5694 100644 --- a/crabfit-frontend/src/components/GoogleCalendar/GoogleCalendar.tsx +++ b/crabfit-frontend/src/components/GoogleCalendar/GoogleCalendar.tsx @@ -113,8 +113,8 @@ const GoogleCalendar = ({ timeZone, timeMin, timeMax, onImport }) => { <Icon src={googleLogo} alt="" /> - {/* eslint-disable-next-line */} <strong>{t('event:you.google_cal.login')}</strong> + {/* eslint-disable-next-line */} (<a href="#" onClick={e => { e.preventDefault(); signOut(); diff --git a/crabfit-frontend/src/components/GoogleCalendar/googleCalendarStyle.ts b/crabfit-frontend/src/components/GoogleCalendar/googleCalendarStyle.ts index fe31510..2afc26f 100644 --- a/crabfit-frontend/src/components/GoogleCalendar/googleCalendarStyle.ts +++ b/crabfit-frontend/src/components/GoogleCalendar/googleCalendarStyle.ts @@ -125,4 +125,8 @@ export const Icon = styled.img` height: 24px; width: 24px; margin-right: 12px; + + ${props => props.theme.mode === 'light' && ` + filter: invert(1); + `} `; diff --git a/crabfit-frontend/src/components/OutlookCalendar/OutlookCalendar.tsx b/crabfit-frontend/src/components/OutlookCalendar/OutlookCalendar.tsx index cbbdce3..ce62594 100644 --- a/crabfit-frontend/src/components/OutlookCalendar/OutlookCalendar.tsx +++ b/crabfit-frontend/src/components/OutlookCalendar/OutlookCalendar.tsx @@ -137,6 +137,7 @@ const OutlookCalendar = ({ timeZone, timeMin, timeMax, onImport }) => { .finally(() => setFreeBusyLoading(false)); }; + // eslint-disable-next-line useEffect(() => checkLogin(), []); useEffect(() => { @@ -156,6 +157,7 @@ const OutlookCalendar = ({ timeZone, timeMin, timeMax, onImport }) => { signOut(); }); } + // eslint-disable-next-line }, [client]); return ( @@ -178,8 +180,8 @@ const OutlookCalendar = ({ timeZone, timeMin, timeMax, onImport }) => { <CalendarList> <Title> <Icon src={outlookLogo} alt="" /> - {/* eslint-disable-next-line */} <strong>{t('event:you.outlook_cal')}</strong> + {/* eslint-disable-next-line */} (<a href="#" onClick={e => { e.preventDefault(); signOut();