Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
reduced warnings and improved theme files
  • Loading branch information
jordantrouw committed Dec 13, 2024
1 parent a9c0254 commit 4a36109
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
5 changes: 2 additions & 3 deletions packages/theme/src/product-theme/dataism/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import {
alpha, createTheme, lighten,
} from '@mui/material'

import { shapeFragment } from '../../theme-fragments/shape.tsx'
import { spacingFragment } from '../../theme-fragments/spacing.tsx'
import { shapeFragment, spacingFragment } from '../../theme-fragments/index.ts'
import { darkThemePalette } from './darkThemePalette.tsx'
import { lightThemePalette } from './lightThemePalette.tsx'

export const DataismTheme = (theme: Theme): Theme => createTheme({
export const DataismTheme = (_theme?: Theme): Theme => createTheme({
colorSchemes: {
dark: { palette: darkThemePalette },
light: { palette: lightThemePalette },
Expand Down
25 changes: 20 additions & 5 deletions packages/theme/src/showcase/theme/TypographyShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,39 +70,54 @@ export const TypographyShowcase: React.FC = () => {
Body1
</Typography>
<Typography variant="body1">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequuntur laudantium dolore magni esse nihil quasi ex maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit. Consequuntur tenetur adipisci natus eius?
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Consequuntur laudantium dolore magni esse nihil quasi ex
maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit.
Consequuntur tenetur adipisci natus eius?
</Typography>
</Stack>
<Stack gap={0.25}>
<Typography variant="subtitle2">
Body2
</Typography>
<Typography variant="body2">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequuntur laudantium dolore magni esse nihil quasi ex maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit. Consequuntur tenetur adipisci natus eius?
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Consequuntur laudantium dolore magni esse nihil quasi ex
maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit.
Consequuntur tenetur adipisci natus eius?
</Typography>
</Stack>
<Stack gap={0.25}>
<Typography variant="subtitle2">
Subtitle1
</Typography>
<Typography variant="subtitle1">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequuntur laudantium dolore magni esse nihil quasi ex maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit. Consequuntur tenetur adipisci natus eius?
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Consequuntur laudantium dolore magni esse nihil quasi ex
maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit.
Consequuntur tenetur adipisci natus eius?
</Typography>
</Stack>
<Stack gap={0.25}>
<Typography variant="subtitle2">
Subtitle2
</Typography>
<Typography variant="subtitle2">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequuntur laudantium dolore magni esse nihil quasi ex maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit. Consequuntur tenetur adipisci natus eius?
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Consequuntur laudantium dolore magni esse nihil quasi ex
maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit.
Consequuntur tenetur adipisci natus eius?
</Typography>
</Stack>
<Stack gap={0.25}>
<Typography variant="subtitle2">
Caption
</Typography>
<Typography variant="caption">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequuntur laudantium dolore magni esse nihil quasi ex maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit. Consequuntur tenetur adipisci natus eius?
Lorem ipsum dolor sit amet consectetur adipisicing elit.
Consequuntur laudantium dolore magni esse nihil quasi ex
maiores sunt rem, dicta vitae reprehenderit animi, exercitationem fugit.
Consequuntur tenetur adipisci natus eius?
</Typography>
</Stack>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/theme-fragments/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
alpha, createTheme, lighten,
} from '@mui/material'

export const componentFragment = (theme: Theme): Theme => createTheme({
export const componentFragment = (_theme?: Theme): Theme => createTheme({
components: {
MuiAlert: {
styleOverrides: {
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/src/theme-fragments/shape.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Theme } from '@mui/material'
import { createTheme } from '@mui/material'

export const shapeFragment = (theme: Theme): Theme => createTheme({ shape: { borderRadius: 4 } })
export const shapeFragment = (_theme?: Theme): Theme => createTheme({ shape: { borderRadius: 4 } })
2 changes: 1 addition & 1 deletion packages/theme/src/theme-fragments/spacing.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Theme } from '@mui/material'
import { createTheme } from '@mui/material'

export const spacingFragment = (theme: Theme): Theme => createTheme({ spacing: 8 })
export const spacingFragment = (_theme?: Theme): Theme => createTheme({ spacing: 8 })

0 comments on commit 4a36109

Please sign in to comment.