1.0.6 • Published 5 years ago

bloop-react v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Bloop

React component that can render JSX in a popup window

Installation

npm install bloop-react

Example Usage

import Bloop from 'bloop-react'

...

render() {
    return (
        <Bloop 
            trigger={<button>i open the popup when clicked</button>}
            size='medium'
            position='center center'
            title='my popup title'
            onOpen={() => console.log('popup opened')}
            onClose={() => console.log('popup closed')}
        >
            <div>your popup content</div>
        </Bloop>
    )
}

Available Props

name: trigger
type: JSX
description: The JSX element that will show the popup when clicked
name: size
type: String
description: The size of the popup
default: 'medium'
options: 'small', 'medium', 'large'
name: position
type: String
description: Initial position of the popup relative to the browser screen
default: 'center center'
options: 'top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right'
name: title
type: String
description: The title that will appear on the popup toolbar
name: onOpen
type: Function
description: Called when the popup opens
name: onClose
type: Function
description: Called when the popup closes

License

MIT

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago