forked from react-bootstrap/react-overlays
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: typescript and docs (react-bootstrap#794)
* WIP * WIP * simplify modal a bit * fix deps * fix lint * fix build * Apply suggestions from code review Co-Authored-By: Steven Loria <[email protected]> * Apply suggestions from code review Co-Authored-By: Jimmy Jia <[email protected]> Co-Authored-By: Steven Loria <[email protected]> * Update src/Modal.tsx Co-Authored-By: Jimmy Jia <[email protected]> * address feedback Co-authored-by: Steven Loria <[email protected]> Co-authored-by: Jimmy Jia <[email protected]>
- Loading branch information
1 parent
40c6554
commit 9c9b441
Showing
78 changed files
with
7,410 additions
and
3,733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
{ | ||
"extends": ["@react-bootstrap"], | ||
"extends": [ | ||
"@react-bootstrap", | ||
"4catalyzer-typescript", | ||
"prettier", | ||
"prettier/react", | ||
"prettier/@typescript-eslint" | ||
], | ||
"plugins": ["prettier"], | ||
"rules": { | ||
"jsx-a11y/no-autofocus": "off", | ||
"prettier/prettier": "error" | ||
"prettier/prettier": "error", | ||
"import/extensions": "off", | ||
"@typescript-eslint/no-empty-function": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
|
||
export type DropDirection = 'up' | 'down' | 'left' | 'right'; | ||
|
||
export type DropdownContextValue = { | ||
toggle: (nextShow: boolean, event?: React.SyntheticEvent | Event) => void; | ||
menuElement: HTMLElement | null; | ||
toggleElement: HTMLElement | null; | ||
setMenu: (ref: HTMLElement | null) => void; | ||
setToggle: (ref: HTMLElement | null) => void; | ||
|
||
show: boolean; | ||
alignEnd?: boolean; | ||
drop?: DropDirection; | ||
}; | ||
|
||
const DropdownContext = React.createContext<DropdownContextValue | null>(null); | ||
|
||
export default DropdownContext; |
Oops, something went wrong.