Cleanp
This commit is contained in:
@@ -10,18 +10,9 @@ import {
|
||||
useMediaQuery,
|
||||
} from "@mui/material";
|
||||
import Slide from "@mui/material/Slide";
|
||||
import { TransitionProps } from "@mui/material/transitions";
|
||||
import type { TransitionProps } from "@mui/material/transitions";
|
||||
import React from "react";
|
||||
|
||||
const Transition = React.forwardRef(function Transition(
|
||||
props: TransitionProps & {
|
||||
children: React.ReactElement
|
||||
},
|
||||
ref: React.Ref<unknown>,
|
||||
) {
|
||||
return <Slide direction="up" ref={ref} {...props} />;
|
||||
});
|
||||
|
||||
interface WhatsNewProps {
|
||||
/** Set this to `true` to show the dialog. */
|
||||
open: boolean;
|
||||
@@ -39,8 +30,8 @@ export const WhatsNew: React.FC<WhatsNewProps> = ({ open, onClose }) => {
|
||||
return (
|
||||
<Dialog
|
||||
{...{ open, fullScreen }}
|
||||
TransitionComponent={SlideTransition}
|
||||
maxWidth="xs"
|
||||
TransitionComponent={Transition}
|
||||
>
|
||||
<DialogTitle>{"What's new"}</DialogTitle>
|
||||
<DialogContent>
|
||||
@@ -68,6 +59,15 @@ export const WhatsNew: React.FC<WhatsNewProps> = ({ open, onClose }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const SlideTransition = React.forwardRef(function Transition(
|
||||
props: TransitionProps & {
|
||||
children: React.ReactElement;
|
||||
},
|
||||
ref: React.Ref<unknown>,
|
||||
) {
|
||||
return <Slide direction="up" ref={ref} {...props} />;
|
||||
});
|
||||
|
||||
const StyledUL = styled("ul")`
|
||||
padding-inline: 1rem;
|
||||
list-style-type: circle;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"extends": "@/build-config/tsconfig-typecheck.json",
|
||||
"compilerOptions": {
|
||||
/* MUI doesn't play great with exactOptionalPropertyTypes currently. */
|
||||
"exactOptionalPropertyTypes": false
|
||||
},
|
||||
"include": [
|
||||
".",
|
||||
"../next/global-electron.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user