Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support plugins #307

Merged
merged 3 commits into from
Mar 13, 2023
Merged

Support plugins #307

merged 3 commits into from
Mar 13, 2023

Conversation

inorganik
Copy link
Owner

Regarding discussion #306, this PR makes CountUp support plugins. A plugin is a class instance or object passed in options that implements a render method:

export declare interface CountUpPlugin {
  render(elem: HTMLElement, formatted: string): void;
}

The plugin's render method will be called on each frame to display the formatted value instead of CountUp's.

@inorganik
Copy link
Owner Author

FYI @msoler75

@inorganik inorganik merged commit 49e46aa into master Mar 13, 2023
@inorganik inorganik mentioned this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant