@zendeskgarden/react-tables
TypeScript icon, indicating that this package has built-in type declarations

8.76.8 • Public • Published

@zendeskgarden/react-tables npm version

This package includes components relating to tables in the Garden Design System.

Installation

npm install @zendeskgarden/react-tables

# Peer Dependencies - Also Required
npm install react react-dom styled-components @zendeskgarden/react-theming

Usage

import { ThemeProvider } from '@zendeskgarden/react-theming';
import {
  Table,
  Caption,
  Head,
  HeaderRow,
  HeaderCell,
  Body,
  Row,
  Cell
} from '@zendeskgarden/react-tables';

/**
 * Place a `ThemeProvider` at the root of your React application
 */
<ThemeProvider>
  <Table>
    <Caption>Your Unsolved Tickets</Caption>
    <Head>
      <HeaderRow>
        <HeaderCell>Subject</HeaderCell>
        <HeaderCell>Requester</HeaderCell>
        <HeaderCell>Requested</HeaderCell>
        <HeaderCell>Type</HeaderCell>
      </HeaderRow>
    </Head>
    <Body>
      <Row>
        <Cell>Where are my shoes?</Cell>
        <Cell>John Smith</Cell>
        <Cell>15 minutes ago</Cell>
        <Cell>Ticket</Cell>
      </Row>
      <Row>
        <Cell>I was charged twice!</Cell>
        <Cell>Jane Doe</Cell>
        <Cell>25 minutes ago</Cell>
        <Cell>Call</Cell>
      </Row>
    </Body>
  </Table>
</ThemeProvider>;

Package Sidebar

Install

npm i @zendeskgarden/react-tables

Weekly Downloads

11,884

Version

8.76.8

License

Apache-2.0

Unpacked Size

97.3 kB

Total Files

62

Last publish

Collaborators

  • zendesk-garden