lbl-popups
v1.1.1
Published
Made with create-react-library
Downloads
7
Readme
react-popups
Made with create-react-library
Install
npm install --save lbl-popups
Usage
// src/index.tsx
import React from 'react'
import ReactDOM from 'react-dom'
import { Popups } from 'lbl-popups'
function App() {
return (
<div>
<Popups />
</div>
)
}
ReactDOM.render(<App />, document.getElementById('root'))
// Anywhere.txs
function Login(props: { title: string }) {
return (
<div>
<h1>{props.title}</h1>
<input />
<input />
<button>login</button>
</div>
)
}
const user = await Popups.open({
el: Login,
props: {
title: 'Login',
},
})