@yozora/react-table-row
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

npm version npm download npm license module formats: cjs, esm Node Version React version styled-components version Tested With Jest Code Style: prettier

@yozora/react-table-row

This package is designed to render mdast table row type data

Install

  • npm

    npm install --save @yozora/react-table-row
  • yarn

    yarn add @yozora/react-table-row

Usage

  • Use in React project

    • Pure

      import React from 'react'
      import TableRow from '@yozora/react-table-row'
      
      const wrapper = (
        <table>
          <tbody>
            <TableRow style={ { color: 'orange', fontSize: '16px' } }>
              <td>
                some text1
                <span>some text2</span>
              </td>
            </TableRow>
          </tbody>
        </table>
      )
    • With theme

      import React from 'react'
      import { DefaultTheme, ThemeProvider } from 'styled-components'
      import TableRow from '@yozora/react-table-row'
      
      const theme: DefaultTheme = {
        yozora: {
          tableRow: {
            // background: 'red',
            evenBackground: 'blue',
          }
        }
      }
      
      const wrapper = (
        <ThemeProvider theme={ theme }>
          <table>
            <tbody>
              <TableRow style={ { color: 'orange', fontSize: '16px' } }>
                <td>
                  some text1
                  <span>some text2</span>
                </td>
              </TableRow>
            </tbody>
          </table>
        </ThemeProvider>
      )
  • Props

    Name Type Required Default Description
    ref React.RefObject<HTMLTableRowElement> false - Forwarded ref callback
    children React.ReactNode true - table row contents

    TableRowProps inherited all attributes of HTMLTableRowElement (React.HTMLAttributes<HTMLTableRowElement>)

  • Theme

    Prop Name Default
    background none
    evenBackground none

    See YozoraTableRowTheme for details.

References

Package Sidebar

Install

npm i @yozora/react-table-row

Weekly Downloads

1

Version

0.0.10

License

MIT

Unpacked Size

11.2 kB

Total Files

8

Last publish

Collaborators

  • lemonclown