Skip to content

Commit 0f87008

Browse files
authored
rm postcss (#2901)
* rm postcss * move control classes into class * add clsx * move back to interface * add ClassNameValue
1 parent fa5e971 commit 0f87008

2 files changed

Lines changed: 18 additions & 17 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@
7979
"dependencies": {
8080
"@codemirror/autocomplete": "^6.17.0",
8181
"@codemirror/commands": "^6.6.0",
82+
"@codemirror/lang-go": "^6.0.1",
83+
"@codemirror/lang-java": "^6.0.2",
8284
"@codemirror/lang-json": "^6.0.1",
85+
"@codemirror/lang-php": "^6.0.2",
8386
"@codemirror/language": "^6.10.2",
8487
"@codemirror/legacy-modes": "^6.4.0",
8588
"@codemirror/state": "^6.4.1",
8689
"@codemirror/view": "^6.29.0",
87-
"@codemirror/lang-java": "^6.0.2",
88-
"@codemirror/lang-go": "^6.0.1",
89-
"@codemirror/lang-php": "^6.0.2",
9090
"@fontsource-variable/inter": "^5.0.8",
9191
"@fontsource/noto-sans-mono": "^5.0.9",
9292
"@lezer/highlight": "^1.1.3",

src/lib/holocene/table/paginated-table/index.svelte

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
<script lang="ts">
22
import type { HTMLAttributes } from 'svelte/elements';
33
4+
import { type ClassNameValue, twMerge as merge } from 'tailwind-merge';
5+
46
import SkeletonTable from '$lib/holocene/skeleton/table.svelte';
57
import Table from '$lib/holocene/table/table.svelte';
68
79
type Item = $$Generic;
810
9-
interface $$Props extends HTMLAttributes<HTMLTableElement> {
11+
interface $$Props extends Omit<HTMLAttributes<HTMLTableElement>, 'class'> {
1012
visibleItems: Item[];
1113
loading?: boolean;
1214
updating?: boolean;
1315
maxHeight?: string;
1416
fixed?: boolean;
17+
class?: ClassNameValue;
1518
}
1619
1720
export let visibleItems: Item[];
@@ -20,15 +23,21 @@
2023
export let maxHeight = '';
2124
export let fixed = false;
2225
26+
let className: ClassNameValue = '';
27+
export { className as class };
28+
2329
let tableContainer: HTMLDivElement;
2430
2531
$: tableOffset = tableContainer?.offsetTop
26-
? tableContainer?.offsetTop + 32
32+
? tableContainer.offsetTop + 32
2733
: 0;
2834
</script>
2935

3036
<div
31-
class="paginated-table-wrapper"
37+
class={merge(
38+
'surface-primary min-h-[154px] grow overflow-auto border border-subtle',
39+
className,
40+
)}
3241
bind:this={tableContainer}
3342
style="max-height: {maxHeight || `calc(100vh - ${tableOffset}px)`}"
3443
>
@@ -45,7 +54,9 @@
4554
<slot />
4655
</Table>
4756
{#if visibleItems.length}
48-
<div class="paginated-table-controls">
57+
<div
58+
class="surface-primary sticky bottom-0 left-0 flex w-full grow items-center justify-between gap-2 border-t border-subtle px-4 py-2"
59+
>
4960
<slot name="actions-start" />
5061
<slot name="actions-center" />
5162
<slot name="actions-end" />
@@ -55,13 +66,3 @@
5566
{/if}
5667
{/if}
5768
</div>
58-
59-
<style lang="postcss">
60-
.paginated-table-wrapper {
61-
@apply surface-primary min-h-[154px] grow overflow-auto border border-subtle;
62-
}
63-
64-
.paginated-table-controls {
65-
@apply surface-primary sticky bottom-0 left-0 flex w-full grow items-center justify-between gap-2 border-t border-subtle px-4 py-2;
66-
}
67-
</style>

0 commit comments

Comments
 (0)