Skip to content

Commit

Permalink
chore(CycleCountdown): add prop descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschlapbach committed Nov 1, 2023
1 parent 7d08027 commit ce838db
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/CycleCountdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ export interface CycleCountdownProps {
}
}

/**
* This function combines the CycleProgress and Countdown components to create a circular progress bar with a countdown in the middle
*
* @param expiresAt - Date when the countdown should expire
* @param totalDuration - Total duration of the countdown in seconds, which is needed to compute the progress in percent
* @param size - Size of the progress bar, can be 'sm' or 'md'
* @param color - Color of the progress bar (static for the moment)
* @param strokeWidthRem - Width of the progress bar. For small size, a smaller value is recommended
* @param isStatic - If true, the countdown will not be running, but instead show the initial value. However, as the end value is given by a date, reloading can modify the displayed countdown value
* @param formatter - Function to format the countdown value
* @param onExpire - Function that is executed when the countdown expires
* @param onUpdate - Function that is executed when the countdown is updated (not when it expires)
* @param data - Optional data object that can be used for testing (e.g. data-test or data-cy)
* @param className - Optional className object allows you to override the default styling
* @returns A circular progress bar with a countdown in the middle
*/
export function CycleCountdown({
expiresAt,
totalDuration,
Expand Down

0 comments on commit ce838db

Please sign in to comment.