feat(progress-indicator-skeleton): add count prop

This commit is contained in:
Eric Liu 2020-10-15 05:17:16 -07:00
commit 696c5dcb2a
2 changed files with 8 additions and 2 deletions

View file

@ -56,4 +56,4 @@
### Skeleton ### Skeleton
<ProgressIndicatorSkeleton /> <ProgressIndicatorSkeleton count={3} />

View file

@ -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}"