1 export interface ProgressBarOptions {
6 export function ProgressBar(current: number, max: number, id: string, opts: ProgressBarOptions) {
9 percent = Math.floor((current / max) * 100);
12 return `<div class="progress-bar" id="${id}" style="background: linear-gradient(to right, ${opts.startingColor}, ${opts.endingColor} ${percent}%, transparent ${percent}%, transparent)"
13 title="${percent}% - ${current}/${max}">${current}/${max} - ${percent}%</div>`;