mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(datatable-skeleton): change to size prop
This commit is contained in:
parent
13ca3bb4c6
commit
8d571d2a29
2 changed files with 8 additions and 7 deletions
|
@ -12,10 +12,10 @@
|
|||
export let rows = 5;
|
||||
|
||||
/**
|
||||
* Set to `true` to use the compact variant
|
||||
* @type {boolean} [compact=false]
|
||||
* Set the size of the data table
|
||||
* @type {"compact" | "short" | "tall"} [size]
|
||||
*/
|
||||
export let compact = false;
|
||||
export let size = undefined;
|
||||
|
||||
/**
|
||||
* Set to `true` to apply zebra styles to the datatable rows
|
||||
|
@ -68,8 +68,10 @@
|
|||
<table
|
||||
class:bx--skeleton="{true}"
|
||||
class:bx--data-table="{true}"
|
||||
class:bx--data-table--compact="{size === 'compact'}"
|
||||
class:bx--data-table--short="{size === 'short'}"
|
||||
class:bx--data-table--tall="{size === 'tall'}"
|
||||
class:bx--data-table--zebra="{zebra}"
|
||||
class:bx--data-table--compact="{compact}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:mouseover
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue