ToastView
ToastView is toast, used to remind the user without interrupting the operation.
Code demo
Success tips
import { Toast } from 'tuya-panel-kit'const [successShow, setSuccessShow] = React.useState(false);<Toast.Successshow={successShow}text="Successful Text"onFinish={() => setSuccessShow(false)}/>
Warning tips
import { Toast } from 'tuya-panel-kit'const [warningShow, setWarningShow] = React.useState(false);<Toast.Warningshow={warningShow}text="Warning Text"onFinish={() => setWarningShow(false)}/>
Error tips
import { Toast } from 'tuya-panel-kit'const [errorShow, setErrorShow] = React.useState(false);<Toast.Errorshow={errorShow}text="Error Text"onFinish={() => setErrorShow(false)}/>
Loading tips
import { Toast } from 'tuya-panel-kit'const [loadingShow, setLoadingShow] = React.useState(false);<Toast.Loading show={loadingShow} onFinish={() => setLoadingShow(false)} />
Light prompt
import { Toast } from 'tuya-panel-kit'const [show, setShow] = React.useState(false);<Toast show={show} text="I'm toastView!!!" onFinish={() => setShow(false)} />