mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
chore(tabs): add count prop for tabs skeleton
This commit is contained in:
parent
90bea887f7
commit
aadc8d9bf1
1 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
<script>
|
||||
/**
|
||||
* Specify the number of tabs to render
|
||||
* @type {number} [count=4]
|
||||
*/
|
||||
export let count = 4;
|
||||
</script>
|
||||
|
||||
<div
|
||||
class:bx--tabs={true}
|
||||
class:bx--skeleton={true}
|
||||
|
@ -13,7 +21,7 @@
|
|||
</svg>
|
||||
</div>
|
||||
<ul class:bx--tabs__nav={true} class:bx--tabs__nav--hidden={true}>
|
||||
{#each [0, 1, 2, 3] as item, i (item)}
|
||||
{#each Array.from({ length: count }, (_, i) => i) as item, i (item)}
|
||||
<li class:bx--tabs__nav-item={true}>
|
||||
<div class:bx--tabs__nav-link={true}> </div>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue