D
D
DappFactory
Search…
⌃K

Components

There are 2 types of components exported for each service:
  1. 1.
    Button
  2. 2.
    Form

Button

You can place the button anywhere inside the app and on clicking the button opens up a modal with the Form inside.
The button accepts an optional prop title, which accepts a string to display the custom modal Form title.
Example:
import React from "react";
import { CreateERC20Button } from "@cryption/dapp-factory-sdk";
const ERC20 = () => {
return (
<>
<CreateERC20Button />
<CreateERC20Button title="Create ERC20 token" />
</>
);
};
export default ERC20;
Result :
Without title prop
With title prop

Form

You can import the Form component like this:
import { CreateERC20 } from "@cryption/dapp-factory-sdk";
const ERC20 = () => {
return <CreateERC20 />;
};
export default ERC20;
Result :
ERC20 as a Service Form component