Skip to content

Commit

Permalink
Make title class optional
Browse files Browse the repository at this point in the history
  • Loading branch information
emilkowalski committed Nov 20, 2023
1 parent a8d2582 commit b5024f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ const Toast = (props: ToastProps) => {
) : null}

<div data-content="">
<div data-title="" className={cn(classNames?.title, toast.classNames.title)}>
<div data-title="" className={cn(classNames?.title, toast?.classNames?.title)}>
{toast.title}
</div>
{toast.description ? (
Expand Down
11 changes: 1 addition & 10 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ export default function Home() {
return (
<div className="wrapper">
<Head />
<Toaster
theme="light"
richColors={richColors}
closeButton={closeButton}
expand={expand}
position={position}
toastOptions={{
classNames: {},
}}
/>
<Toaster theme="light" richColors={richColors} closeButton={closeButton} expand={expand} position={position} />
<main className="container">
<Hero />
<div className="content">
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ You can do the same when calling `toast()`.
toast('Hello World', {
classNames: {
toast: '!bg-blue-400',
title: '!text-red-400',
title: '!text-red-400 !text-2xl',
description: '!text-red-400',
actionButton: '!bg-zinc-400',
cancelButton: '!bg-orange-400',
Expand Down

0 comments on commit b5024f8

Please sign in to comment.