Skip to content

Commit

Permalink
Add TS types for component-component, dialog, portal, rect, alert-dia…
Browse files Browse the repository at this point in the history
…log, and utils.
  • Loading branch information
Harry Hedger committed Mar 30, 2019
1 parent c4fa9c9 commit e4a0a4e
Show file tree
Hide file tree
Showing 21 changed files with 6,544 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/alert-dialog/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
declare module "@reach/alert-dialog" {
import { DialogProps, DialogContentProps } from "@reach/dialog";

type AlertDialogProps = {
isOpen?: boolean;
onDismiss?: () => void;
leastDestructiveRef?: React.RefObject<HTMLElement>;
children: React.ReactNode;
} & DialogProps;

type AlertDialogContentProps = {
children: React.ReactNode;
} & DialogContentProps;

export const AlertDialog: React.SFC<AlertDialogProps>;
export const AlertDialogLabel: React.SFC<HTMLDivElement>;
export const AlertDialogDescription: React.SFC<HTMLDivElement>;
export const AlertDialogOverlay: React.SFC<AlertDialogProps>;
export const AlertDialogContent: React.SFC<AlertDialogContentProps>;
}
1 change: 1 addition & 0 deletions packages/alert-dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"license": "MIT",
"main": "index.js",
"module": "es/index.js",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Write some tests you bum!\"",
"build": "node ../../shared/build-package",
Expand Down
Loading

0 comments on commit e4a0a4e

Please sign in to comment.