mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
feat(components): add initial DataTable component
This commit is contained in:
parent
68cdaf30de
commit
f7551e4a8f
11 changed files with 359 additions and 0 deletions
22
src/components/DataTable/TableContainer.svelte
Normal file
22
src/components/DataTable/TableContainer.svelte
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script>
|
||||
let className = undefined;
|
||||
export { className as class };
|
||||
export let stickyHeader = false;
|
||||
export let title = '';
|
||||
export let description = '';
|
||||
export let style = undefined;
|
||||
|
||||
import { cx } from '../../lib';
|
||||
</script>
|
||||
|
||||
<div
|
||||
class={cx('--data-table-container', stickyHeader && '--data-table--max-width', className)}
|
||||
{style}>
|
||||
{#if title}
|
||||
<div class={cx('--data-table-header')}>
|
||||
<h4 class={cx('--data-table-header__title')}>{title}</h4>
|
||||
<p class={cx('--data-table-header__description')}>{description}</p>
|
||||
</div>
|
||||
{/if}
|
||||
<slot />
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue