ui icon indicating copy to clipboard operation
ui copied to clipboard

Toast documentation **Out of date**

Open s-ileris opened this issue 2 years ago • 3 comments

The toast documentation is out of date.

s-ileris avatar May 06 '23 18:05 s-ileris

Can you describe what is obsolete?

Natchii59 avatar May 07 '23 08:05 Natchii59

@Natchii59 I've been trying to use and notice the same

Documentation say

Add the<Toaster /> component to your app.

The <Toaster /> component is where your toasts are displayed. You can place it anywhere in your app, but it's recommended to place it at the root of your app.

import { Toaster } from "@/components/ui/toaster"

export default function App({ Component, pageProps }) {
  return (
    <>
      <Component {...pageProps} />
      <Toaster />
    </>
  )
}

But the command npx shadcn-ui add toast does not adds the Toaster Component

Reference: https://ui.shadcn.com/docs/components/toast

kevenleone avatar May 07 '23 23:05 kevenleone

Probably it's related to absence of Toaster component, if so, there's already those issues opened

https://github.com/shadcn/ui/issues/238 https://github.com/shadcn/ui/issues/234

And the fix was sent here: https://github.com/shadcn/ui/pull/243

kevenleone avatar May 07 '23 23:05 kevenleone