Skip to content

Commit

Permalink
feat: use inverse color of "dark" sections
Browse files Browse the repository at this point in the history
  • Loading branch information
mwskwong committed May 26, 2024
1 parent 2a08461 commit b5993bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
9 changes: 6 additions & 3 deletions src/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { SiRss } from '@icons-pack/react-simple-icons';
import {
Box,
Button,
Chip,
Container,
Grid,
IconButton,
Sheet,
Stack,
Typography,
} from '@mui/joy';
Expand Down Expand Up @@ -119,10 +119,13 @@ const Blog: FC<BlogProps> = async ({ params: { slug } }) => {
{blog.content ? <Mdx source={blog.content} /> : null}
</Container>
<SectionDivider sx={{ bgcolor: contactMeBgColor }} />
<Box
<Sheet
invertedColors
color="primary"
component="section"
data-joy-color-scheme="dark"
sx={{ bgcolor: contactMeBgColor }}
variant="solid"
>
<Container>
<Stack
Expand Down Expand Up @@ -195,7 +198,7 @@ const Blog: FC<BlogProps> = async ({ params: { slug } }) => {
</Stack>
</Stack>
</Container>
</Box>
</Sheet>
</main>
<SectionDivider
sx={{ color: contactMeBgColor, bgcolor: 'var(--Footer-bg)' }}
Expand Down
16 changes: 11 additions & 5 deletions src/components/home/interesting-fact.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
Box,
type BoxProps,
Button,
Container,
Link,
Sheet,
type SheetProps,
Stack,
Tooltip,
Typography,
Expand All @@ -14,12 +14,18 @@ import { getTechStack } from '@/lib/queries';

import { Image } from '../image';

export type InterestingFactProps = Omit<BoxProps<'section'>, 'children'>;
export type InterestingFactProps = Omit<SheetProps<'section'>, 'children'>;
export const InterestingFact: FC<InterestingFactProps> = async (props) => {
const techStack = await getTechStack();

return (
<Box component="section" {...props}>
<Sheet
invertedColors
color="primary"
component="section"
variant="solid"
{...props}
>
<Container>
<Stack
spacing={8}
Expand Down Expand Up @@ -63,6 +69,6 @@ export const InterestingFact: FC<InterestingFactProps> = async (props) => {
</Button>
</Stack>
</Container>
</Box>
</Sheet>
);
};

0 comments on commit b5993bd

Please sign in to comment.