https://github.com/darkpurple141/table
A POC of an AK Table
https://github.com/darkpurple141/table
Last synced: 7 months ago
JSON representation
A POC of an AK Table
- Host: GitHub
- URL: https://github.com/darkpurple141/table
- Owner: DarkPurple141
- Created: 2021-07-11T07:40:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-12T07:52:49.000Z (about 4 years ago)
- Last Synced: 2025-01-18T05:08:46.692Z (9 months ago)
- Language: TypeScript
- Size: 4.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Examples
## Render Prop
```tsx
import Table, { Row, Cell, TBody, THead, HeadCell } from '@atlaskit/table'import { presidents } from './data'
type President = typeof presidents[number]
/**
* Primary UI component for user interaction
*/
export const RenderProp = ({ isSelectable }) => {
return (
numRows={presidents.length} isSelectable={isSelectable}>
Name
Party
Year
rows={presidents}>
{(row) => (
{row.nm}
{row.pp}
{row.tm}
)}
)
}
```## Composition
```tsx
import '@atlaskit/css-reset'
import Table, { Row, Cell, TBody, THead, HeadCell } from '@atlaskit/table'import { presidents } from './data'
/**
* Primary UI component for user interaction
*/
export const CompositionExample = ({ isSelectable }) => {
return (
Name
Party
Year
{presidents.map((row) => (
{row.nm}
{row.pp}
{row.tm}
))}
)
}
```