feat: add LoadingBar component with known and unknown states

This commit is contained in:
2026-06-09 13:15:01 +02:00
parent b3ec60db5d
commit ef22eb5615
4 changed files with 67 additions and 1 deletions
@@ -0,0 +1,19 @@
---
export interface Props {
type: 'known' | 'unknown';
percentage?: number;
width?: string;
}
const { type, percentage, width } = Astro.props;
---
<div class='loading-bar loading-bar--${type}' style={width ? `width: ${width}` : undefined}>
{type === 'known' && percentage !== undefined ? (
<div class='loading-bar__progress' style={`width: ${percentage}%`}></div>
) : (
<div class='loading-bar__unknown'></div>
)}
</div>
<style lang="scss">
@use './loadingBar';
</style>