Skip to content

Commit

Permalink
fix: side bar title color based on theme
Browse files Browse the repository at this point in the history
  • Loading branch information
jainpawan21 committed Feb 4, 2024
1 parent 033b90d commit d054f83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/web/src/pages/templates/components/WorkflowSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import { useNavigate } from 'react-router-dom';
import { colors, Sidebar } from '@novu/design-system';

import { useBasePath } from '../hooks/useBasePath';
import { useLocalThemePreference } from '@novu/shared-web';

export const WorkflowSidebar = ({ children, title }: { children: ReactNode; title: string }) => {
const navigate = useNavigate();
const path = useBasePath();
const { themeStatus } = useLocalThemePreference();

const isDark = themeStatus === 'dark';

return (
<Sidebar
Expand All @@ -21,7 +25,7 @@ export const WorkflowSidebar = ({ children, title }: { children: ReactNode; titl
display: 'flex',
flexFlow: 'Column',
}}
color={colors.white}
color={isDark ? colors.white : colors.black}
size={20}
weight="bold"
>
Expand Down
1 change: 1 addition & 0 deletions libs/design-system/src/config/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const error = '#E54545';

export const colors = {
white: '#FFFFFF',
black: '#000000',
BGLight: '#EDF0F2',
BGDark: '#13131A',
B98: '#F5F8FA',
Expand Down

0 comments on commit d054f83

Please sign in to comment.