Skip to content

Commit

Permalink
Added shadcn example
Browse files Browse the repository at this point in the history
  • Loading branch information
noam-honig committed Apr 25, 2024
1 parent 873cf37 commit c6f1612
Show file tree
Hide file tree
Showing 47 changed files with 8,673 additions and 40 deletions.
18 changes: 18 additions & 0 deletions examples/shadcn-react-table/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions examples/shadcn-react-table/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
4 changes: 4 additions & 0 deletions examples/shadcn-react-table/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": true
}
15 changes: 15 additions & 0 deletions examples/shadcn-react-table/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Shadcn React Table

This examples demos server side sorting / filtering / paging using remult with shadcn design

[Open in stackblitz](https://stackblitz.com/github/remult/remult/tree/main/examples/shadcn-react-table)

Based on Shadcn tasks example:
https://ui.shadcn.com/examples/tasks
and this table example
https://table.sadmn.com/

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
17 changes: 17 additions & 0 deletions examples/shadcn-react-table/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/index.css",
"baseColor": "slate",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
13 changes: 13 additions & 0 deletions examples/shadcn-react-table/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit c6f1612

Please sign in to comment.