Skip to content

Commit

Permalink
Fix missing Modal ts props
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethnym committed Feb 15, 2021
1 parent a1c4bc6 commit f2e1a0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ export type BulmaComponentWithoutRenderAs<
> = (
props: TProps & Omit<ElementProps<TProps, THTMLElement>, 'renderAs'>,
) => React.ReactElement;

export type BulmaComponentWithoutModifiers<TProps> = (
props: TProps,
) => React.ReactElement;
9 changes: 7 additions & 2 deletions src/components/modal/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { BulmaComponent, BulmaComponentWithoutModifiers } from '..';
import { BulmaComponent } from '..';

interface ModalProps {
show?: boolean;
Expand All @@ -8,14 +8,19 @@ interface ModalProps {
closeOnBlur?: boolean;
showClose?: boolean;
domRef?: React.RefObject<HTMLDivElement>;
document?: Document;
children: React.ReactNode;
className?: string;
}

interface ModalCardHeadProps {
showClose?: boolean;
onClose?: () => void;
}

export const Modal: BulmaComponentWithoutModifiers<ModalProps> & {
export const Modal: (
props: ModalProps,
) => React.ReactElement & {
Content: BulmaComponent<{}, 'div'>;
Card: BulmaComponent<{}, 'div'> & {
Head: BulmaComponent<ModalCardHeadProps, 'header'>;
Expand Down

0 comments on commit f2e1a0a

Please sign in to comment.