Skip to content

Commit

Permalink
Animation times use properties defined in theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Doebbel committed Sep 23, 2024
1 parent 04e4554 commit 89e6fb6
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 68 deletions.

This file was deleted.

7 changes: 0 additions & 7 deletions frontend/src/material-ui-pigment-css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,11 @@ declare module "@mui/material/styles" {
lg: string;
}

interface CustomTime {
normal: string;
slow: string;
}

interface Theme {
zIndex: ZIndex;
customProperties: {
spacing: CustomSpacing;
borderRadius: CustomBorderRadius;
time: Partial<CustomTime>;
};
}

Expand All @@ -54,7 +48,6 @@ declare module "@mui/material/styles" {
customProperties?: {
spacing?: Partial<CustomSpacing>;
borderRadius?: Partial<CustomBorderRadius>;
time?: Partial<CustomTime>;
};
}
}
Expand Down
23 changes: 0 additions & 23 deletions frontend/src/styles/_animations.scss

This file was deleted.

1 change: 0 additions & 1 deletion frontend/src/styles/_globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ body {
flex: 1 1 auto;
height: 100%;
width: 100%;
animation: var(--mui-customProperties-time-slow) fade-in forwards;
}

.flex {
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

@forward "vendors/toastify.css";

@forward "animations";

@forward "export";

@forward "fonts";
Expand Down
9 changes: 1 addition & 8 deletions frontend/src/themes/theme.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import { createTheme } from "@mui/material/styles";
import palette from "./palette";
import typography from "./typography";
import {
breakpoints,
zIndex,
spacingValues,
borderRadius,
time,
} from "./variables";
import { breakpoints, zIndex, spacingValues, borderRadius } from "./variables";

const theme = createTheme({
cssVariables: true, // creates css variables for theme values
Expand All @@ -28,7 +22,6 @@ const theme = createTheme({
customProperties: {
spacing: spacingValues,
borderRadius: borderRadius,
time: time,
},
});

Expand Down
7 changes: 1 addition & 6 deletions frontend/src/themes/variables.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomBorderRadius, CustomSpacing, CustomTime } from "@mui/material";
import { CustomBorderRadius, CustomSpacing } from "@mui/material";
import { BreakpointsOptions, ZIndex } from "@mui/material/styles";

export const breakpoints: BreakpointsOptions["values"] = {
Expand Down Expand Up @@ -32,8 +32,3 @@ export const borderRadius: CustomBorderRadius = {
md: "16px",
lg: "24px",
};

export const time: CustomTime = {
normal: "0.35s",
slow: "0.5s",
};

0 comments on commit 89e6fb6

Please sign in to comment.