Socket
Socket
Sign inDemoInstall

@atlaskit/table

Package Overview
Dependencies
Maintainers
0
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/table

A table is used to display data.


Version published
Weekly downloads
781
decreased by-10.13%
Maintainers
0
Weekly downloads
 
Created
Source

Table

WARNING!

This is an experimental package for exploration and validation of the foundations for the Atlassian Design System.

Description

A table is used to display and organise complex data.

Usage

import Table from '@atlaskit/table';

Detailed docs and example usage can be found here.

Render Prop

import '@atlaskit/css-reset';
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 (
		<Table isSelectable={isSelectable}>
			<THead>
				<HeadCell>Name</HeadCell>
				<HeadCell>Party</HeadCell>
				<HeadCell>Year</HeadCell>
			</THead>
			<TBody<President> rows={presidents}>
				{(row) => (
					<Row key={row.id} {...row}>
						<Cell>{row.nm}</Cell>
						<Cell>{row.pp}</Cell>
						<Cell>{row.tm}</Cell>
					</Row>
				)}
			</TBody>
		</Table>
	);
};

Composition

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 (
		<Table isSelectable={isSelectable}>
			<THead>
				<HeadCell>Name</HeadCell>
				<HeadCell>Party</HeadCell>
				<HeadCell>Year</HeadCell>
			</THead>
			<TBody>
				{presidents.map((row) => (
					<Row key={row.id}>
						<Cell>{row.nm}</Cell>
						<Cell>{row.pp}</Cell>
						<Cell>{row.tm}</Cell>
					</Row>
				))}
			</TBody>
		</Table>
	);
};

FAQs

Package last updated on 07 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc