Skip to content

Commit

Permalink
Merge 9769ac5 into e0aecf3
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarkelov committed Dec 12, 2019
2 parents e0aecf3 + 9769ac5 commit 843d5b2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import * as React from 'react';

export interface RenderCounterProps {
countUpRef: React.RefObject<any>;
start?: () => void;
pauseResume?: () => void;
reset?: () => void;
update?: (newEnd?: number) => void;
}

export interface CountUpProps {
className?: string;
decimal?: string;
Expand All @@ -21,6 +29,7 @@ export interface CountUpProps {
onPauseResume?: ({ reset, start, update }) => void;
onReset?: ({ pauseResume, start, update }) => void;
onUpdate?: ({ pauseResume, reset, start }) => void;
children?: (props: RenderCounterProps) => JSX.Element;
}

declare class CountUp extends React.Component<CountUpProps, any> {}
Expand All @@ -44,7 +53,7 @@ type countUpHook = (
start: () => void;
pauseResume: () => void;
reset: () => void;
update: () => void;
update: (newEnd?: number) => void;
};

export const useCountUp: countUpHook;
Expand Down

0 comments on commit 843d5b2

Please sign in to comment.