add icon for button

connect-component
Ryukemeister 2023-10-10 23:13:51 +05:30
parent e48b054252
commit 342820e0bd
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ export function ConnectButton({
buttonText,
onButtonClick,
stylesClassname,
icon,
}: ConnectButtonProps & AtomsGlobalConfigProps) {
const [isProcessing, setIsProcessing] = useState<boolean>(false);
const [errMsg, setErrMsg] = useState<string>("");
@ -45,6 +46,7 @@ export function ConnectButton({
type="button"
disabled={!isProcessing}
onClick={(event) => handleSubmit(event)}>
{!!icon && icon}
{buttonText || "Install App"}
</Button>
{!!errMsg && <span>{errMsg}</span>}