mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
refactor(lib): extract fillArray utility
This commit is contained in:
parent
06e02c3dc3
commit
f3c702947c
7 changed files with 23 additions and 10 deletions
|
@ -5,7 +5,7 @@
|
|||
export let rowCount = 5;
|
||||
export let style = undefined;
|
||||
|
||||
import { cx } from '../../lib';
|
||||
import { cx, fillArray } from '../../lib';
|
||||
|
||||
const _class = cx(
|
||||
'--skeleton',
|
||||
|
@ -13,7 +13,7 @@
|
|||
border && '--structured-list--border',
|
||||
className
|
||||
);
|
||||
const rows = Array.from({ length: rowCount - 1 }, (_, i) => i);
|
||||
const rows = fillArray(rowCount - 1);
|
||||
</script>
|
||||
|
||||
<section on:click on:mouseover on:mouseenter on:mouseleave class={_class} {style}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue