Skip to content

Commit

Permalink
Merge pull request #466 from mwskwong/canary
Browse files Browse the repository at this point in the history
Canary
  • Loading branch information
mwskwong committed Aug 31, 2024
2 parents d79cedb + 8fa3902 commit 087b4bb
Show file tree
Hide file tree
Showing 10 changed files with 188 additions and 184 deletions.
1 change: 1 addition & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const config = {
experimental: {
reactCompiler: true,
ppr: true,
pprFallbacks: true,
optimizePackageImports: ['@mui/joy'],
},
} satisfies NextConfig;
Expand Down
310 changes: 155 additions & 155 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"@icons-pack/react-simple-icons": "^10.0.0",
"@mui/base": "next",
"@mui/joy": "next",
"@mui/material-nextjs": "^6.0.0",
"@mui/styled-engine": "^6.0.0",
"@mui/material-nextjs": "^6.0.1",
"@mui/styled-engine": "^6.0.1",
"@prisma/client": "^5.19.0",
"@react-email/body": "^0.0.10",
"@react-email/container": "^0.0.14",
Expand All @@ -43,7 +43,7 @@
"geist": "^1.3.1",
"lodash-es": "^4.17.21",
"lucide-react": "^0.436.0",
"merge-sx": "^3.0.1",
"merge-sx": "^3.2.0",
"next": "canary",
"next-mdx-remote": "^5.0.0",
"react": "rc",
Expand All @@ -55,8 +55,8 @@
"resend": "^4.0.0",
"schema-dts": "^1.1.2",
"server-only": "^0.0.1",
"shiki": "^1.14.1",
"valibot": "^0.39.0"
"shiki": "^1.15.1",
"valibot": "^0.40.0"
},
"devDependencies": {
"@next/bundle-analyzer": "canary",
Expand All @@ -75,11 +75,11 @@
"prettier": "^3.3.3",
"prettier-plugin-prisma": "^5.0.0",
"prisma": "^5.19.0",
"type-fest": "^4.25.0",
"type-fest": "^4.26.0",
"typescript": "^5.5.4"
},
"overrides": {
"@mui/system": "^6.0.0",
"@mui/system": "^6.0.1",
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const Blog: FC<BlogProps> = async ({ params: { slug } }) => {
size="sm"
target="_blank"
>
<SiRss viewBox="-2 -2 28 28" />
<SiRss className="si" />
</IconButton>
</Stack>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion src/components/blog/share-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const ShareDropdown: FC<ShareDropdownProps> = ({ blog, ...props }) => {
{socialMediaOptions.map(({ Icon, name, url }) => (
<MenuItem key={name} component="a" href={url} target="_blank">
<ListItemDecorator>
<Icon viewBox="-2 -2 28 28" />
<Icon className="si" />
</ListItemDecorator>
Share on {name}
</MenuItem>
Expand Down
2 changes: 1 addition & 1 deletion src/components/contentful.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import * as contentfulIds from '@/constants/contentful-ids';

const generateSimpleIcon = (SiIcon: IconType) => {
const Icon: FC<ComponentProps<IconType>> = (props) => (
<SiIcon viewBox="-2 -2 28 28" {...props} />
<SiIcon className="si" {...props} />
);
Icon.displayName = SiIcon.displayName;
return Icon;
Expand Down
2 changes: 1 addition & 1 deletion src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const Footer: FC<FooterProps> = async (props) => {
size="sm"
target="_blank"
>
<SiRss viewBox="-2 -2 28 28" />
<SiRss className="si" />
</IconButton>
</Stack>

Expand Down
2 changes: 1 addition & 1 deletion src/components/guestbook/submission-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const SubmissionListError: FC<SubmissionListErrorProps> = ({
sx={mergeSx({ '--Icon-fontSize': '4rem', alignItems: 'center' }, sx)}
{...props}
>
<Frown absoluteStrokeWidth size={4 * 16} />
<Frown strokeWidth={1} />
<Typography sx={{ textAlign: 'center' }}>
Something went wrong. Please try again later.
</Typography>
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const Hero: FC<HeroProps> = async ({ sx, ...props }) => {
component="a"
href={linkedinProfile?.url}
size="lg"
startDecorator={<SiLinkedin viewBox="-2 -2 28 28" />}
startDecorator={<SiLinkedin className="si" />}
target="_blank"
variant="outlined"
>
Expand Down
35 changes: 19 additions & 16 deletions src/theme.ts → src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { type PaletteOptions } from '@mui/joy/styles/types';
import { type Interpolation } from '@mui/styled-engine';
import { GeistMono } from 'geist/font/mono';
import { GeistSans } from 'geist/font/sans';
import { Check } from 'lucide-react';
import { type PartialDeep } from 'type-fest';

declare module '@mui/joy/styles/types/zIndex' {
Expand Down Expand Up @@ -30,6 +31,9 @@ export const theme = extendTheme({
},
components: {
JoyCheckbox: {
defaultProps: {
checkedIcon: <Check />,
},
styleOverrides: {
root: {
WebkitTapHighlightColor: 'transparent',
Expand Down Expand Up @@ -59,8 +63,16 @@ export const theme = extendTheme({
},
});

export const globalStyles = (theme: Theme) =>
({
export const globalStyles = (theme: Theme) => {
const iconStyle = {
color: 'var(--Icon-color, var(--joy-palette-text-icon))',
margin: 'var(--Icon-margin)',
fontSize: 'var(--Icon-fontSize, 1.5rem)',
width: '1em',
height: '1em',
};

return {
':root': {
'--Section-paddingY': theme.spacing(10),
'--Footer-paddingY': theme.spacing(6),
Expand Down Expand Up @@ -104,17 +116,8 @@ export const globalStyles = (theme: Theme) =>
},
main: { flex: 1 },
section: { paddingBlock: 'var(--Section-paddingY)' },
svg: {
display: 'block',
// match icons, the 2nd one is for Simple Icons with modified view box
// such that the icon will appears to have the same size as Lucide icons
'&[viewBox="0 0 24 24"], &[viewBox="-2 -2 28 28"]': {
color: 'var(--Icon-color, var(--joy-palette-text-icon))',
margin: 'var(--Icon-margin)',
fontSize: 'var(--Icon-fontSize, 1.5rem)',
width: '1em',
height: '1em',
flexShrink: 0,
},
},
}) satisfies Interpolation<Theme>;
svg: { display: 'block' },
'.lucide': iconStyle,
'.si': { ...iconStyle, padding: '0.083em' },
} satisfies Interpolation<Theme>;
};

1 comment on commit 087b4bb

@vercel
Copy link

@vercel vercel bot commented on 087b4bb Aug 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.