mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(progress-indicator-skeleton): add count prop
This commit is contained in:
parent
4dc9a48b02
commit
696c5dcb2a
2 changed files with 8 additions and 2 deletions
|
@ -56,4 +56,4 @@
|
||||||
|
|
||||||
### Skeleton
|
### Skeleton
|
||||||
|
|
||||||
<ProgressIndicatorSkeleton />
|
<ProgressIndicatorSkeleton count={3} />
|
|
@ -4,6 +4,12 @@
|
||||||
* @type {boolean} [vertical=false]
|
* @type {boolean} [vertical=false]
|
||||||
*/
|
*/
|
||||||
export let vertical = false;
|
export let vertical = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify the number of steps to render
|
||||||
|
* @type {number} [count=4]
|
||||||
|
*/
|
||||||
|
export let count = 4;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ul
|
<ul
|
||||||
|
@ -16,7 +22,7 @@
|
||||||
on:mouseenter
|
on:mouseenter
|
||||||
on:mouseleave
|
on:mouseleave
|
||||||
>
|
>
|
||||||
{#each [0, 1, 2, 3] as item, i (item)}
|
{#each Array.from({ length: count }, (_, i) => i) as item, i (item)}
|
||||||
<li
|
<li
|
||||||
class:bx--progress-step="{true}"
|
class:bx--progress-step="{true}"
|
||||||
class:bx--progress-step--incomplete="{true}"
|
class:bx--progress-step--incomplete="{true}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue