Skip to content

Commit febbf72

Browse files
authored
Website with demo table using shadcn-svelte (#8)
* Website with demo table using shadcn-svelte * Deploy * vercel adapter
1 parent 35a5fd5 commit febbf72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3091
-189
lines changed

.github/workflows/check.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ jobs:
1717
- name: Install dependencies
1818
run: npm ci
1919

20-
- name: Lint and svelte-check
20+
- name: svelte-check
2121
run: npm run check
22+
23+
- name: Unit tests
24+
run: npm test

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
engine-strict=true
2+
legacy-peer-deps=true

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"singleQuote": true,
44
"trailingComma": "none",
55
"printWidth": 100,
6-
"plugins": ["prettier-plugin-svelte"],
6+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
77
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
88
}

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
1-
<h1 align="center">@careswitch/svelte-data-table</h1>
1+
<h1 align="center">svelte-data-table</h1>
22

3-
<p align="center">Simple data table library with client-side sorting, filtering, and pagination.</p>
3+
<p align="center">Small, fast data table library with client-side sorting, filtering, and pagination.</p>
44

55
- No dependencies
66
- TypeScript
7-
- SvelteKit, SSR, and Svelte 5 Runes
7+
- Supports SvelteKit, SSR, Svelte 5
88

9-
## Quickstart
9+
## Installation
1010

11-
`npm install @careswitch/svelte-data-table`
11+
```bash
12+
npm install @careswitch/svelte-data-table
13+
```
14+
15+
## Usage
16+
17+
```svelte
18+
<script lang="ts">
19+
import { DataTable } from '@careswitch/svelte-data-table';
20+
21+
const table = new DataTable({
22+
data: [
23+
{ id: 1, name: 'John Doe', status: 'active' },
24+
{ id: 2, name: 'Jane Doe', status: 'inactive' }
25+
],
26+
columns: [
27+
{ key: 'id', name: 'ID' },
28+
{ key: 'name', name: 'Name' },
29+
{ key: 'status', name: 'Status', sortable: false }
30+
]
31+
});
32+
</script>
33+
```

components.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://shadcn-svelte.com/schema.json",
3+
"style": "new-york",
4+
"tailwind": {
5+
"config": "tailwind.config.ts",
6+
"css": "src/app.css",
7+
"baseColor": "zinc"
8+
},
9+
"aliases": {
10+
"components": "$lib/components",
11+
"utils": "$lib/utils"
12+
},
13+
"typescript": true
14+
}

0 commit comments

Comments
 (0)