mirror of
https://github.com/fergalmoran/supanextail.git
synced 2026-01-03 15:14:26 +00:00
Fix issue with ToastContainer classes
This commit is contained in:
@@ -25,24 +25,6 @@ type LayoutProps = {
|
|||||||
const Layout = ({ children }: LayoutProps): JSX.Element => {
|
const Layout = ({ children }: LayoutProps): JSX.Element => {
|
||||||
const { user, signOut } = useAuth();
|
const { user, signOut } = useAuth();
|
||||||
|
|
||||||
type toast = {
|
|
||||||
success: string;
|
|
||||||
error: string;
|
|
||||||
info: string;
|
|
||||||
warning: string;
|
|
||||||
default: string;
|
|
||||||
dark: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
const toastStyle: toast = {
|
|
||||||
// Style your toast elements here
|
|
||||||
success: 'bg-accent',
|
|
||||||
error: 'bg-red-600',
|
|
||||||
info: 'bg-gray-600',
|
|
||||||
warning: 'bg-orange-400',
|
|
||||||
default: 'bg-primary',
|
|
||||||
dark: 'bg-white-600 font-gray-300',
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen w-full bg-base-100 text-base-content m-auto font-body">
|
<div className="min-h-screen w-full bg-base-100 text-base-content m-auto font-body">
|
||||||
<Head>
|
<Head>
|
||||||
@@ -57,14 +39,7 @@ const Layout = ({ children }: LayoutProps): JSX.Element => {
|
|||||||
<div className="max-w-7xl flex flex-col min-h-screen mx-auto p-5">
|
<div className="max-w-7xl flex flex-col min-h-screen mx-auto p-5">
|
||||||
<Nav user={user} signOut={signOut} />
|
<Nav user={user} signOut={signOut} />
|
||||||
<main className="flex-1">{children}</main>
|
<main className="flex-1">{children}</main>
|
||||||
<ToastContainer
|
<ToastContainer position="bottom-center" />
|
||||||
position="bottom-center"
|
|
||||||
toastClassName={({ type }) =>
|
|
||||||
`${
|
|
||||||
toastStyle[type || 'default']
|
|
||||||
} flex p-5 my-5 min-h-10 rounded-md justify-between overflow-hidden cursor-pointer `
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
3
next-env.d.ts
vendored
3
next-env.d.ts
vendored
@@ -1,3 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/types/global" />
|
/// <reference types="next/types/global" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
|
// NOTE: This file should not be edited
|
||||||
|
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||||
|
|||||||
Reference in New Issue
Block a user