Skip to content

Commit

Permalink
fix(modal): add missing modal typings (#586)
Browse files Browse the repository at this point in the history
Fixes: #581
  • Loading branch information
dlabrecq authored and dgutride committed Aug 31, 2018
1 parent 0e9bead commit 80c2b83
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {SFC, HTMLProps, ReactNode} from 'react';

export interface BackdropProps extends HTMLProps<HTMLDivElement> {
children?: ReactNode;
className?: string;
}

declare const Backdrop: SFC<BackdropProps>;

export default Backdrop;
16 changes: 16 additions & 0 deletions packages/patternfly-4/react-core/src/components/Modal/Modal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {SFC, HTMLProps, ReactNode} from 'react';

export interface ModalProps extends HTMLProps<HTMLDivElement> {
actions?: any,
children: ReactNode;
className?: string;
hideTitle?: boolean;
isLarge?: boolean;
isOpen?: boolean;
onClose?: Function;
title: string;
}

declare const Modal: SFC<ModalProps>;

export default Modal;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {SFC, HTMLProps, ReactNode} from 'react';

export interface ModalBoxProps extends HTMLProps<HTMLDivElement> {
children: ReactNode;
className?: string;
id: string;
isLarge?: boolean;
title: string;
}

declare const ModalBox: SFC<ModalBoxProps>;

export default ModalBox;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {SFC, HTMLProps, ReactNode} from 'react';

export interface ModalBoxBodyProps extends HTMLProps<HTMLDivElement> {
children?: ReactNode;
className?: string;
id?: string;
}

declare const ModalBoxBody: SFC<ModalBoxBodyProps>;

export default ModalBoxBody;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {SFC, HTMLProps, ReactNode} from 'react';

export interface ModalBoxCloseButtonProps extends HTMLProps<HTMLDivElement> {
className?: string;
onClose?: Function;
}

declare const ModalBoxCloseButton: SFC<ModalBoxCloseButtonProps>;

export default ModalBoxCloseButton;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {SFC, HTMLProps, ReactNode} from 'react';

export interface ModalBoxFooterProps extends HTMLProps<HTMLDivElement> {
children?: ReactNode;
className?: string;
}

declare const ModalBoxFooter: SFC<ModalBoxFooterProps>;

export default ModalBoxFooter;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {SFC, HTMLProps, ReactNode} from 'react';

export interface ModalBoxHeaderProps extends HTMLProps<HTMLDivElement> {
children?: ReactNode;
className?: string;
}

declare const ModalBoxHeader: SFC<ModalBoxHeaderProps>;

export default ModalBoxHeader;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {SFC, HTMLProps, ReactNode} from 'react';

export interface ModalContentProps extends HTMLProps<HTMLDivElement> {
children: ReactNode;
className?: string;
id: string;
isLarge?: boolean;
isOpen?: boolean;
hideTitle?: boolean;
actions?: any,
onClose?: Function;
title: string;
}

declare const ModalContent: SFC<ModalContentProps>;

export default ModalContent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export { default as Backdrop, BackdropProps } from './Backdrop';
export { default as Modal, ModalProps } from './Modal';
export { default as ModalBox, ModalBoxProps } from './ModalBox';
export { default as ModalBoxBody, ModalBoxBodyProps } from './ModalBoxBody';
export { default as ModalBoxCloseButton, ModalBoxCloseButtonProps } from './ModalBoxCloseButton';
export { default as ModalBoxFooter, ModalBoxFooterProps } from './ModalBoxFooter';
export { default as ModalBoxHeader, ModalBoxHeaderProps } from './ModalBoxHeader';
export { default as ModalContent, ModalContentProps } from './ModalContent';
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
export { default as Backdrop } from './Backdrop';
export { default as Modal } from './Modal';
export { default as ModalBox } from './ModalBox';
export { default as ModalBoxBody } from './ModalBoxBody';
export { default as ModalBoxCloseButton } from './ModalBoxCloseButton';
export { default as ModalBoxFooter } from './ModalBoxFooter';
export { default as ModalBoxHeader } from './ModalBoxHeader';
export { default as ModalContent } from './ModalContent';
1 change: 1 addition & 0 deletions packages/patternfly-4/react-core/src/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export * from './Badge';
export * from './Button';
export * from './Card';
export * from './Checkbox';
export * from './Modal';
export * from './Radio';
export * from './Title';
export * from './Alert';
Expand Down

0 comments on commit 80c2b83

Please sign in to comment.