mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-07-11 06:32:34 +02:00
15 lines
279 B
TypeScript
15 lines
279 B
TypeScript
export default (width: number, progress: number): string => {
|
|
const dotPosition = Math.floor(width * progress);
|
|
|
|
let res = '';
|
|
|
|
for (let i = 0; i < width; i++) {
|
|
if (i === dotPosition) {
|
|
res += '🔘';
|
|
} else {
|
|
res += '▬';
|
|
}
|
|
}
|
|
|
|
return res;
|
|
};
|