mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-14 21:45:29 +01:00
16 lines
279 B
TypeScript
16 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;
|
|
};
|