Last active
March 25, 2022 10:02
-
-
Save waptik/6b40ea4c8a6f90ae8446a33fd2cb4441 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Copy to: src/types/react-table-config.d.ts | |
export * from '@saas-ui/data-table/src/react-table-config.d' |
This file contains hidden or 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
import { Column, DataTable } from '@saas-ui/react'; | |
interface ExampleData { | |
id: string | |
name: string | |
email: string | |
} | |
const columns: Column<ExampleData>[] = [ | |
{ | |
accessor: 'id', | |
Header: 'Id', | |
}, | |
{ | |
accessor: 'name', | |
Header: 'Name', | |
}, | |
{ | |
accessor: 'email', | |
Header: 'Email', | |
}, | |
] | |
const data: ExampleData[] = [{ | |
{ | |
id: 1, | |
name: 'TaShya Charles', | |
email: '[email protected]' | |
}, | |
{ | |
id: 2, | |
name: 'Donovan Mosley', | |
email: '[email protected]', | |
}, | |
}] | |
const TryDataTable = () => { | |
return <DataTable<ExampleData> columns={columns} data={data} /> | |
} |
This file contains hidden or 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
{ | |
"compilerOptions": { | |
"target": "es5", | |
"lib": ["dom", "dom.iterable", "esnext"], | |
"allowJs": true, | |
"skipLibCheck": true, | |
"strict": true, | |
"strictNullChecks": true, | |
"forceConsistentCasingInFileNames": true, | |
"noEmit": true, | |
"esModuleInterop": true, | |
"module": "esnext", | |
"moduleResolution": "node", | |
"resolveJsonModule": true, | |
"isolatedModules": true, | |
"jsx": "preserve", | |
"useUnknownInCatchVariables": true, | |
"allowSyntheticDefaultImports": true, | |
"downlevelIteration": true, | |
"types": ["@types/jest"], | |
"incremental": true, | |
"baseUrl": ".", | |
"paths": { | |
"~/*": ["src/*"], | |
"~components/*": ["src/components/*"], | |
"~utils/*": ["src/utils/*"], | |
"~server/*": ["src/server/*"] | |
} | |
}, | |
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], | |
"exclude": ["node_modules"], | |
"ts-node": { | |
"compilerOptions": { | |
"module": "CommonJS", | |
"types": ["node"] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment