@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
13 lines (10 loc) • 418 B
JavaScript
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import { toast } from "react-hot-toast";
import ToastRoot from "./ToastRoot";
const createToast = (content, options) => {
toast(content, _objectSpread({}, options));
};
const createToastPromise = async (content, options) => {
await toast.promise(content, _objectSpread({}, options));
};
export { ToastRoot, createToast, createToastPromise };