general-assistant
Version:
General Assistant components
10 lines (9 loc) • 582 B
JavaScript
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
import { useEffect, useState } from 'react';
export default function ComposerToast({ data }) {
const [toastInfo, setToastInfo] = useState(data);
useEffect(() => {
setToastInfo(data);
}, [data]);
return _jsx(_Fragment, { children: toastInfo && (_jsx("div", { className: 'DS-GA-absolute DS-GA-top-[-200%] DS-GA-left-[50%] DS-GA-translate-x-[-50%] DS-GA-px-[20px] DS-GA-py-[14px] DS-GA-text-base DS-GA-rounded-[8px] DS-GA-bg-[#414141] DS-GA-text-white', children: toastInfo.text })) });
}