Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@softhem.se/table

alibth1ISC1.0.6

This is a table React Component

Softhem, Table, React, JS

readme

Table

A React Table Component.

Install

You can get it on npm.

npm install @softhem.se/table --save

Usage

import React from 'react';
import '@softhem.se/table.css';
import Table from '@softhem.se/table';

function App() {
    return (
        <div className="App">
            <section className="dashboard" id="dashboard">
                <div className="dashboard--center">
                    <div className="row">
                        <div className="col-1-of-1">
                            <Table/>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    );
}

export default App;

Props

* The field key shows the column to be shown
* The items field items is the data
Table.defaultProps = {
    fields:['id', 'title', 'genre'],
    items: [
        {id: 4, title: "Dolores velit ratio", description: "Quo minus laborum ut", genre: "rock", image_path: "images/08422f90-f47f-11e9-a1e7-e342a465e3f6_27.png",},
        {id: 3, title: "Omnis sed do magnam ", description: "Ex consequatur sint", genre: "rock", image_path: "images/99f99a20-f44a-11e9-ab34-c7f808721400_11.png",},
        {id: 2, title: "Laboris soluta nostr", description: "Ad maxime possimus ", genre: "jazz", image_path: "images/85588900-f44a-11e9-ab34-c7f808721400_23.png",},
        {id: 1, title: "Molestiae aliquam it", description: "Ea ea architecto eni", genre: "jazz", image_path: "images/607ad250-f44a-11e9-ab34-c7f808721400_24.png",}
    ]
};

Publish

Prepare

npm run publish:prep

Publish to npm (after login)

npm run publish:npm

License

MIT License © Hazrat Ali