* draft: implementation * chore: migrated toast from @plane/ui to propel package * chore: reverted unwanted changes * fix: lint errors * chore: added dismiss toast to propel toast * fix: build and lint errors * chore: code refactor --------- Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
19 lines
442 B
TypeScript
19 lines
442 B
TypeScript
"use client";
|
|
|
|
import { ReactNode } from "react";
|
|
import { useTheme } from "next-themes";
|
|
// plane imports
|
|
import { Toast } from "@plane/propel/toast";
|
|
import { resolveGeneralTheme } from "@plane/utils";
|
|
|
|
export const ToastProvider = ({ children }: { children: ReactNode }) => {
|
|
// themes
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
return (
|
|
<>
|
|
<Toast theme={resolveGeneralTheme(resolvedTheme)} />
|
|
{children}
|
|
</>
|
|
);
|
|
};
|