@onboardbase/react-transit
v0.0.12
Published
Empowers applications through safer and more secure storage of user-generated data
Downloads
5
Readme
Transit (React)
Description
Transit empowers applications through safer and more secure storage of user-generated data
Install
To use react-transit
,
yarn add @onboardbase/react-transit
Usage
Import the react-transit package
import { Transit } from "@onboardbase/react-transit";
Add your project name, distinct environment name for each request, and API Key as props
import { Transit } from "@onboardbase/react-transit";
import "@onboardbase/react-transit/style.css";
export default function Home() {
const options = {
// Required
apiKey: "XXXXXX",
environment: "new-env",
project: "projectname",
onSuccess: (data) => {
console.log("success", data);
},
onError: (err) => {
console.log(err);
},
// Optional
hideTags: true,
fields: [
{ name: "username", required: false },
{ name: "password" },
{ name: "providers", options: ["mongodb", "postgres", "mysql"] },
],
className: { input: "", select: "", saveBtn: "" },
};
return (
<main>
<Transit options={options} />
</main>
);
}