@scripty/react-articles

0.1.21 • Public • Published

@scripty/react-articles

Description

lightweight react card component.

alt text

Usage

npm install -s @scripty/react-articles
Client: Example.jsx
import React, { Fragment } from 'react';
import { Card } from '@src';

export const Example = () => {

    const onClick = (e) => {
        console.log(e);
    }

    return (
        <Fragment>
            <h2>Card</h2>
            <Card
                title={'Simple Card'}
                width={300}
            >
                Simple Card Content
            </Card>

            <h2>Card with Actions</h2>
            <Card
                title={'Card with actions'}
                width={300}
                onEdit={onClick}
                onClose={onClick}
            >
                Simple Card Content
            </Card>

            <h2>Card with custom actions</h2>
            <Card
                title={'Card with actions'}
                width={300}
                extra={'custom field'}
            >
                Simple Card Content
            </Card>

            <h2>Card with ok and cancel buttons</h2>
            <Card
                title={'Card with actions'}
                width={300}
                onEdit={onClick}
                onClose={onClick}
                onOk={onClick}
                onCancel={onClick}
            >
                Simple Card Content
            </Card>
        </Fragment>
    );
};

Package Sidebar

Install

npm i @scripty/react-articles

Homepage

garic.biz

Weekly Downloads

0

Version

0.1.21

License

MIT

Unpacked Size

35.7 kB

Total Files

9

Last publish

Collaborators

  • garic