mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +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
20
src/components/DataTable/TableRow.svelte
Normal file
20
src/components/DataTable/TableRow.svelte
Normal file
|
@ -0,0 +1,20 @@
|
|||
<script>
|
||||
let className = undefined;
|
||||
export { className as class };
|
||||
export let isSelected = false;
|
||||
export let style = undefined;
|
||||
|
||||
import { cx } from '../../lib';
|
||||
|
||||
// TODO: include ariaLabel, onExpand, isExpanded, isSelected
|
||||
</script>
|
||||
|
||||
<tr
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave
|
||||
class={cx(isSelected && '--data-table--selected', className)}
|
||||
{style}>
|
||||
<slot />
|
||||
</tr>
|
Loading…
Add table
Add a link
Reference in a new issue