1.0.1 • Published 10 months ago

react-markdown-table v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

React Markdown Table

react-markdown-table is a React component library for generating and previewing markdown tables.

Installation

npm install react-markdown-table

Usage

import React from 'react';
import MarkdownTable from 'react-markdown-table';

const data = [
  ['Planet', 'Distance', 'Gravity'],
  ['Mercury', '57.9 million km', '3.7 m/s²'],
  ['Venus', '108.2 million km', '8.9 m/s²'],
  ['Earth', '149.6 million km', '9.8 m/s²'],
];

const App = () => {
  return (
    <div>
      <MarkdownTable data={data} /> {/* <MarkdownTable data={data} view={false} /> */}
    </div>
  );
};

export default App;

Props

  • data (required): An array of table data. The first element represents the table header, and the rest are data rows.
  • view (optional): A boolean flag to control the view mode of the table. Set to true (default) to display the table, or set to false to hide the table and only show the copy button.

License

This project is licensed under the MIT License.

1.0.1

10 months ago

1.0.0

10 months ago

0.0.11

10 months ago

0.0.1

10 months ago

0.0.11-pre

10 months ago

0.0.10-pre

10 months ago

0.0.9-pre

10 months ago

0.0.8-pre

10 months ago

0.0.7-pre

10 months ago

0.0.6-pre

10 months ago

0.0.5-pre

10 months ago

0.0.4-pre

10 months ago

0.0.3-pre

10 months ago

0.0.2-pre

10 months ago

0.0.1-pre

10 months ago