yarn add https://github.com/ErickDevv/react.glass
import { GlassForm, GlassFormParams } from 'react.glass'
const App = () => {
const params: GlassFormParams = {
Form: {
title: "Login",
buttonText: "Login",
submitFunction: () => { console.log("Submitted") }
},
Inputs: [
{
label: "Username",
type: "text",
placeholder: "Username",
changeFunction: (e: any) => { console.log(e.target.value) }
},
{
label: "Password",
type: "password",
placeholder: "Password",
changeFunction: (e: any) => { console.log(e.target.value) }
}
]
}
return (
<div>
<GlassForm {...params} />
</div>
)
}
export default App