Documentation
Modals
Tip

Tip Modal

In order to open Tip modal, you need to connect account first.

Usage

import { useIsConnected, useTipModal } from "@crossbell/connect-kit";
 
const characterId = 10;
const noteId = 291;
 
export function TipBtn() {
	const isConnected = useIsConnected();
	const { isActive, show, hide } = useTipModal();
 
	if (!isConnected) return null;
 
	return (
		<>
			<button onClick={() => show({ noteId, characterId })}>Tip Note</button>
			<button onClick={() => show({ characterId })}>Tip Character</button>
		</>
	);
}

Return type

OptionTypeDescription
isActivebooleanIndicates whether the modal is activated or not
show(params: { noteId: number, characterId: number }) => voidShow modal
hide() => voidHide modal