Skip to content

Commit

Permalink
fix: Improved card visibility on dark mode (#870)
Browse files Browse the repository at this point in the history
Co-authored-by: Noam Gaash <[email protected]>
  • Loading branch information
TomRytt and NoamGaash authored Sep 1, 2024
1 parent 36a5046 commit 527f974
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/shared/Widget.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import Card from '@mui/material/Card'
import CardContent from '@mui/material/CardContent'
import cn from 'classnames'

import { useTheme } from 'src/layout/ThemeContext'

const Widget = (props: { children: React.ReactNode }) => {
const { isDarkTheme } = useTheme()
return (
<Card>
<Card className={cn('card', { dark: isDarkTheme })}>
<CardContent>{props.children} </CardContent>
</Card>
)
Expand Down
5 changes: 5 additions & 0 deletions src/shared/shared.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
padding: 20px;
margin-bottom: 20px;
}

.card.dark {
background: linear-gradient(145deg, #252525, #141414);
border: 1px solid #fff;
}

0 comments on commit 527f974

Please sign in to comment.