Skip to content

Commit

Permalink
Merge pull request #46 from Honeybrain/NightMode
Browse files Browse the repository at this point in the history
Night mode
  • Loading branch information
valentinbreiz authored Jan 18, 2024
2 parents 73178c6 + 61cf653 commit f01a4f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ const Navbar = () => {
);
};

export default Navbar;
export default Navbar;
6 changes: 5 additions & 1 deletion src/components/dashboard/BlockManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const BlockManager = () => {
const [alertText, setAlertText] = React.useState('');
const { t } = useTranslation();
const { isNightMode } = useContext(NightModeContext);
const nightModeBgColor1 = 'color1ForNightMode';
const nightModeBgColor2 = 'color2ForNightMode';
const textFieldStyle = isNightMode
? {
InputLabelProps: { style: { color: 'white' } },
Expand Down Expand Up @@ -110,7 +112,9 @@ const BlockManager = () => {
<ListItem key={index} sx={{
my: 1,
px: 2,
bgcolor: index % 2 === 0 ? 'action.hover' : 'background.default',
bgcolor: isNightMode
? (index % 2 === 0 ? nightModeBgColor1 : nightModeBgColor2)
: (index % 2 === 0 ? 'action.hover' : 'background.default'),
borderRadius: 1
}}>
<ListItemText primary={blacklistedIP} />
Expand Down

0 comments on commit f01a4f3

Please sign in to comment.