1.2.7 • Published 6 years ago

luban-modal v1.2.7

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

Prefix named Luban, salute the God of craftsman

luban

usage

To avoid redundant code and for maximum style flexibility, all colors(such as bg color, font-color) must be defined by yourself in css style

npm i luban-modal --save

or

yarn add luban-modal --save
import Modal from 'luban-modal';

const Demo = () => {
    const [show, setShow] = React.useState(false)

    const onRight = (e) => {}

    const onCancel = (e) => {
        setShow(false)
    }

    const onLeft = (e) => {}

    const onShow = () => {
        setShow(true)
    }
    return (

        <div>
            <button onClick={onShow}>click</button>
            {
                show &&
                <Modal
                    title='title title'
                    onRight={onRight}
                    right='Comfirm'
                    onCancel={onCancel}
                    onLeft={onLeft}
                    left='Cancel'
                >
                    <div>line line</div>
                    <div>line line line lineline line</div>
                </Modal>
            }
        </div>


    )
}
1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago