1.0.6 • Published 6 years ago

@softhem.se/table v1.0.6

Weekly downloads
9
License
ISC
Repository
-
Last release
6 years ago

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

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago