mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11: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;
|
export let rows = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to `true` to use the compact variant
|
* Set the size of the data table
|
||||||
* @type {boolean} [compact=false]
|
* @type {"compact" | "short" | "tall"} [size]
|
||||||
*/
|
*/
|
||||||
export let compact = false;
|
export let size = undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to `true` to apply zebra styles to the datatable rows
|
* Set to `true` to apply zebra styles to the datatable rows
|
||||||
|
@ -68,8 +68,10 @@
|
||||||
<table
|
<table
|
||||||
class:bx--skeleton="{true}"
|
class:bx--skeleton="{true}"
|
||||||
class:bx--data-table="{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--zebra="{zebra}"
|
||||||
class:bx--data-table--compact="{compact}"
|
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
|
5
types/index.d.ts
vendored
5
types/index.d.ts
vendored
|
@ -789,10 +789,9 @@ export class DataTableSkeleton extends CarbonSvelteComponent {
|
||||||
rows?: number;
|
rows?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to `true` to use the compact variant
|
* Set the size of the data table
|
||||||
* @default false
|
|
||||||
*/
|
*/
|
||||||
compact?: boolean;
|
size?: "compact" | "short" | "tall";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to `true` to apply zebra styles to the datatable rows
|
* Set to `true` to apply zebra styles to the datatable rows
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue