-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from Stanley-Jovel/feature/add-typscript-support
Add Typescript support
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
declare class Collapsible extends React.Component<CollapsibleProps> {} | ||
declare namespace Collapsible {} | ||
|
||
interface CollapsibleProps extends React.HTMLProps<Collapsible> { | ||
transitionTime?: number | ||
transitionCloseTime?: number | null | ||
triggerTagName?: string | ||
easing?: string | ||
open?: boolean | ||
classParentString?: string | ||
openedClassName?: string | ||
triggerStyle?: null | Object | ||
triggerClassName?: string | ||
triggerOpenedClassName?: string | ||
contentOuterClassName?: string | ||
contentInnerClassName?: string | ||
accordionPosition?: string | number | ||
handleTriggerClick?: (accordionPosition?: string | number) => void | ||
onOpen?: () => void | ||
onClose?: () => void | ||
onOpening?: () => void | ||
onClosing?: () => void | ||
trigger: string | React.ReactElement<any> | ||
triggerWhenOpen?: string | React.ReactElement<any> | ||
triggerDisabled?: false | ||
lazyRender?: boolean | ||
overflowWhenOpen?: | ||
| 'hidden' | ||
| 'visible' | ||
| 'auto' | ||
| 'scroll' | ||
| 'inherit' | ||
| 'initial' | ||
| 'unset' | ||
triggerSibling?: React.ReactElement<any> | ||
className?: string | ||
tabIndex?: null | number | ||
} | ||
|
||
declare module 'react-collapsible' { | ||
export default Collapsible | ||
} |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
"accordion" | ||
], | ||
"main": "dist/Collapsible.js", | ||
"types": "./index.d.ts", | ||
"author": "Glenn Flanagan <[email protected]>", | ||
"contributors": [ | ||
"Karl Taylor <[email protected]", | ||
|