0.0.10 • Published 4 years ago

@yozora/react-table-row v0.0.10

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

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

    NameTypeRequiredDefaultDescription
    refReact.RefObject<HTMLTableRowElement>false-Forwarded ref callback
    childrenReact.ReactNodetrue-table row contents

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

  • Theme

    Prop NameDefault
    backgroundnone
    evenBackgroundnone

    See YozoraTableRowTheme for details.

References

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago