ui / src / apps / providers.tsxmain at d68d7e1
import type { ReactNode } from "react";
import { Toaster } from "#/components/ui/sonner.tsx";
import { TooltipProvider } from "#/components/ui/tooltip.tsx";
/** Every client app's root providers. */
export function AppProviders(props: { children: ReactNode }) {
return (
// Base UI tooltips are intended to share a provider; setting delay=0
// here makes hover tooltips feel immediate across the app.
// First-party docs:
// https://github.com/mui/base-ui/blob/master/docs/src/app/(docs)/react/components/tooltip/page.mdx
// Base UI tooltips are intended to share a provider; setting delay=0
// here makes hover tooltips feel immediate across the app.
// First-party docs:
// https://github.com/mui/base-ui/blob/master/docs/src/app/(docs)/react/components/tooltip/page.mdx
<TooltipProvider delay={0}>
{props.children}
{/* Light, as the app is whatever the system says. The vendored Toaster would ask
next-themes, which with no provider answers "system". */}
<Toaster theme="light" />
</TooltipProvider>
);
}