Typescript

This commit is contained in:
Mitchell McCaffrey
2021-07-16 18:59:29 +10:00
parent 2ce9d2dd08
commit a1fb67df7b
22 changed files with 314 additions and 203 deletions

View File

@@ -2,6 +2,7 @@ import React, { ReactChild } from "react";
import Modal, { Props } from "react-modal";
import { useThemeUI, Close } from "theme-ui";
import { useSpring, animated, config } from "react-spring";
import CSS from "csstype";
type ModalProps = Props & {
children: ReactChild | ReactChild[];
@@ -38,7 +39,7 @@ function StyledModal({
...(style?.overlay || {}),
},
content: {
backgroundColor: theme.colors.background,
backgroundColor: theme.colors?.background as CSS.Property.Color,
top: "initial",
left: "initial",
bottom: "initial",