Skip to content

Commit 8ee19cd

Browse files
committed
fix: Typescript definition update
1 parent 5615e69 commit 8ee19cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ interface TriggerState {
9999
/**
100100
* Internal usage. Do not use in your code since this will be removed.
101101
*/
102-
export function generateTrigger(PortalComponent: any) {
102+
export function generateTrigger(PortalComponent: any): React.ComponentClass<TriggerProps> {
103103
class Trigger extends React.Component<TriggerProps, TriggerState> {
104104
static contextType = TriggerContext;
105105

@@ -369,7 +369,7 @@ export function generateTrigger(PortalComponent: any) {
369369
}
370370
};
371371

372-
static getDerivedStateFromProps({ popupVisible }, prevState: TriggerState) {
372+
static getDerivedStateFromProps({ popupVisible }: TriggerProps, prevState: TriggerState) {
373373
const newState: Partial<TriggerState> = {};
374374

375375
if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {

0 commit comments

Comments
 (0)