Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ink-table

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ink-table - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "ink-table",
"version": "1.0.1",
"version": "1.0.2",
"description": "A table component for Ink.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,2 +0,6 @@

# ink-table [![Build Status](https://travis-ci.org/maticzav/ink-table.svg?branch=master)](https://travis-ci.org/maticzav/ink-table)
# ink-table
[![Build Status](https://travis-ci.org/maticzav/ink-table.svg?branch=master)](https://travis-ci.org/maticzav/ink-table)
[![npm version](https://badge.fury.io/js/ink-table.svg)](https://badge.fury.io/js/ink-table)
> A table component for [Ink](https://github.com/vadimdemedes/ink).

@@ -6,5 +10,5 @@

```bash
npm install ink-table
```
$ npm install ink-table
```

@@ -15,14 +19,42 @@ ## Usage

const data = [
{name: 'Sosa Saunders', gender: 'male', age: 17, email: 'sosa.saunders@mail.com', phone: '+1 (809) 435-2786'},
{name: 'Angelina Kirk', gender: 'female', age: 3, email: 'angelina@kirk.io', phone: '+1 (870) 567-3516'},
{name: 'Bradford Rosales', gender: 'male', age: 20, email: 'bradfordrosales@fast.com', phone: '+1 (918) 573-3240'},
{name: 'Gwen Schroeder', gender: 'female', age: 17, email: 'gwen@corp.xyz', phone: '+1 (987) 417-2062'},
{name: 'Ellison Mann', gender: 'male', age: 5, email: 'ellisonmann@katakana.com', phone: '+1 (889) 411-2186'}
]
{
name: "Sosa Saunders",
gender: "male",
age: 17,
email: "sosa.saunders@mail.com",
phone: "+1 (809) 435-2786"
},
{
name: "Angelina Kirk",
gender: "female",
age: 3,
email: "angelina@kirk.io",
phone: "+1 (870) 567-3516"
},
{
name: "Bradford Rosales",
gender: "male",
age: 20,
email: "bradfordrosales@fast.com",
phone: "+1 (918) 573-3240"
},
{
name: "Gwen Schroeder",
gender: "female",
age: 17,
email: "gwen@corp.xyz",
phone: "+1 (987) 417-2062"
},
{
name: "Ellison Mann",
gender: "male",
age: 5,
email: "ellisonmann@katakana.com",
phone: "+1 (889) 411-2186"
}
];
const Basic = () => (
<Table data={data}/>
)
const Basic = () => <Table data={data} />;
render(<Basic/>)
render(<Basic />);
```

@@ -32,23 +64,26 @@

## Props
#### data `array<object>`
### data `array<object>`
> List of all the values (rows).
#### padding `number`
### padding `number`
> Offset inside each cell. This is considered one side value (set to 2 will have 2 spaces on the left and on the right - 4 combined).
#### header `({children}) => h`
### header `({children}) => h`
> A component used as header cell. Value is passed as `children` prop.
_(Recommend using `<Color/>` with `chalk` props.)_
> _(Recommend using `<Color/>` with `chalk` props.)_
#### cell `({children}) => h`
### cell `({children}) => h`
> A component used as regular cell. Value is passed as `children` prop.
_(Recommend using `<Color/>` with `chalk` props.)_
> _(Recommend using `<Color/>` with `chalk` props.)_
#### skeleton `({children}) => h`
> A component used as skeleton (lines and crosses ...). Value is passed as `children` prop.
_(Recommend using `<Color/>` with `chalk` props.)_
### skeleton `({children}) => h`
> A component used as skeleton (lines and crosses ...). Value is passed as `children` prop.
> _(Recommend using `<Color/>` with `chalk` props.)_

@@ -55,0 +90,0 @@ ## License

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc