🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

react-markdown-table

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-markdown-table

React component library for generating and previewing markdown tables

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
9
-10%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

markdown table

FAQs

Package last updated on 16 Jul 2023

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