This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(DataTable): the DataTable component now uses th properly
- Loading branch information
1 parent
6b501a1
commit 839670d
Showing
3 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
16 changes: 13 additions & 3 deletions
16
packages/svelte-materialify/src/components/DataTable/DataTableCell.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
<script> | ||
import { getContext } from 'svelte'; | ||
let klass = ''; | ||
export { klass as class }; | ||
export let numeric = false; | ||
const isTableHead = getContext('is-table-head') === true; | ||
</script> | ||
|
||
<style lang="scss" src="./DataTableCell.scss" global> | ||
</style> | ||
|
||
<td class="s-tbl-cell {klass}" class:numeric> | ||
<slot /> | ||
</td> | ||
{#if isTableHead} | ||
<th class="s-tbl-cell {klass}" class:numeric> | ||
<slot /> | ||
</th> | ||
{:else} | ||
<td class="s-tbl-cell {klass}" class:numeric> | ||
<slot /> | ||
</td> | ||
{/if} |
4 changes: 4 additions & 0 deletions
4
packages/svelte-materialify/src/components/DataTable/DataTableHead.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/svelte-materialify/src/components/DataTable/DataTableRow.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import './variables'; | ||
|
||
.s-tbl-row { | ||
border-top-color: $tbl-border-color; | ||
border-top-style: solid; | ||
|