diff --git a/web/packages/design/src/Dialog/Dialog.tsx b/web/packages/design/src/Dialog/Dialog.tsx
index 5a015aa3f363c..9cdd9ff1d4a5f 100644
--- a/web/packages/design/src/Dialog/Dialog.tsx
+++ b/web/packages/design/src/Dialog/Dialog.tsx
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-import { forwardRef, PropsWithChildren } from 'react';
+import { ComponentProps, forwardRef, PropsWithChildren } from 'react';
import styled, { StyleFunction } from 'styled-components';
import Modal, { ModalProps } from './../Modal';
@@ -30,7 +30,7 @@ export const Dialog = forwardRef<
PropsWithChildren<
{
className?: string;
- dialogCss?: StyleFunction;
+ dialogCss?: StyleFunction>;
} & ModalPropsWithoutChildren
>
>((props, ref) => {
@@ -68,7 +68,9 @@ const ModalBox = styled.div`
transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
`;
-const DialogBox = styled.div<{ dialogCss: StyleFunction | undefined }>`
+const DialogBox = styled.div<{
+ dialogCss: StyleFunction> | undefined;
+}>`
padding: 32px;
padding-top: 24px;
background: ${props => props.theme.colors.levels.surface};
diff --git a/web/packages/design/src/DialogConfirmation/DialogConfirmation.tsx b/web/packages/design/src/DialogConfirmation/DialogConfirmation.tsx
index 80b0c33ead6d7..dec91a4e2ee10 100644
--- a/web/packages/design/src/DialogConfirmation/DialogConfirmation.tsx
+++ b/web/packages/design/src/DialogConfirmation/DialogConfirmation.tsx
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-import { ReactNode } from 'react';
+import { ComponentProps, ReactNode } from 'react';
import { StyleFunction } from 'styled-components';
import Dialog from 'design/Dialog';
@@ -35,7 +35,7 @@ export function DialogConfirmation(props: {
event: KeyboardEvent | React.MouseEvent,
reason: 'escapeKeyDown' | 'backdropClick'
) => void;
- dialogCss?: StyleFunction;
+ dialogCss?: StyleFunction>;
}) {
return (
.
*/
-import React, { createRef, cloneElement } from 'react';
+import React, { createRef, cloneElement, ComponentProps } from 'react';
import styled, { StyleFunction } from 'styled-components';
import { createPortal } from 'react-dom';
@@ -36,9 +36,7 @@ export type ModalProps = {
/**
* Styles passed to the modal, the parent of the children.
*/
- // TODO(ravicious): The type for modalCss might need some work after we migrate the components
- // that use to TypeScript.
- modalCss?: StyleFunction;
+ modalCss?: StyleFunction>;
/**
* The child must be a single HTML element. Modal used to call methods such as focus and
@@ -96,7 +94,7 @@ export type ModalProps = {
export default class Modal extends React.Component {
lastFocus: HTMLElement | undefined;
- modalRef = createRef();
+ modalRef = createRef();
mounted = false;
componentDidMount() {
@@ -272,8 +270,7 @@ const StyledBackdrop = styled.div`
`;
const StyledModal = styled.div<{
- modalCss?: StyleFunction;
- ref: React.RefObject;
+ modalCss?: StyleFunction>;
hiddenInDom?: boolean;
}>`
position: fixed;