Made with create-react-library
npm install --save lbl-popups
// 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',
},
})