feat(cards): refine controls and modal transitions

This commit is contained in:
2026-09-12 22:34:27 +03:00
parent cf21a5bd17
commit aba4cf1ce8
16 changed files with 245 additions and 107 deletions
+27
View File
@@ -10,3 +10,30 @@ a {
color: inherit;
text-decoration: none;
}
@media (prefers-reduced-motion: no-preference) {
.mantine-Modal-content {
animation: modal-appear 220ms ease-out;
}
.mantine-Modal-overlay {
animation: modal-backdrop-appear 220ms ease-out;
}
}
@keyframes modal-appear {
from {
opacity: 0;
transform: translateY(8px) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes modal-backdrop-appear {
from {
opacity: 0;
}
}
+15
View File
@@ -4,6 +4,7 @@ import {
createTheme,
getThemeColor,
type MantinePrimaryShade,
Modal,
rem,
rgba,
} from "@mantine/core";
@@ -21,6 +22,20 @@ const colorRoles = mapValues(color.roles, (role) =>
);
const theme = createTheme({
respectReducedMotion: true,
components: {
Modal: Modal.extend({
defaultProps: {
overlayProps: { blur: 3 },
transitionProps: {
transition: "fade-down",
duration: 220,
exitDuration: 180,
timingFunction: "ease-out",
},
},
}),
},
primaryColor: color.roles.primary.color,
primaryShade: color.primaryShade as MantinePrimaryShade,
defaultRadius: radius.default,