Skip to content

Commit 6b046ed

Browse files
committed
refactor: (playground) rename ToastCustomOptions to ToastHeadless and update toast messages for ToastAnimation
1 parent 7e5e62d commit 6b046ed

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

website/src/components/playground/toastAnimation.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ const ToastAnimation = () => {
1212

1313
const handleChangeAnimation = (animation: ToastAnimations) => {
1414
setToastAnimation(animation);
15-
toast.default({
16-
text: `A default toast 🚀`,
17-
description: `✨ @pheralb/toast`,
15+
toast.info({
16+
text: `Close me 👀`,
17+
description: `✨ ${animation} animation`,
1818
});
1919
};
2020

website/src/components/playground/toastCustomOptions.tsx website/src/components/playground/toastHeadless.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Codeblock from "@/components/codeblock/client";
1515

1616
import { Button } from "@/ui/button";
1717

18-
const ToastCustomOptions = () => {
18+
const ToastHeadless = () => {
1919
const { applyCustomTheme, setApplyCustomTheme } = useDocsStore();
2020

2121
const toastStyles: ToastOptions = {
@@ -30,9 +30,7 @@ const ToastCustomOptions = () => {
3030
"relative flex items-center",
3131
),
3232
container: cn("flex items-center py-4 space-x-2 px-4 w-full"),
33-
content: cn(
34-
"flex flex-col space-y-0.5 mr-2 [p:nth-child(1)]:text-red-500 dark:[p:nth-child(1)]:text-red-400",
35-
),
33+
content: cn("flex flex-col space-y-0.5 mr-2"),
3634
actions: {
3735
container: cn("flex flex-col px-3"),
3836
actionBtn: cn(
@@ -66,8 +64,8 @@ const ToastCustomOptions = () => {
6664

6765
const handleTryToast = () => {
6866
toast.success({
69-
text: "Custom styles",
70-
description: "Built with Tailwind CSS",
67+
text: "Headless Toast",
68+
description: "with Tailwind CSS",
7169
delayDuration: 14000,
7270
action: {
7371
onClick: () => {
@@ -153,4 +151,4 @@ const ToastCustomOptions = () => {
153151
);
154152
};
155153

156-
export default ToastCustomOptions;
154+
export default ToastHeadless;

website/src/mdx/components.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import InstallLibrary from "@/components/installLibrary";
66
import FrameworkGuidesComponent from "@/components/frameworkGuides";
77

88
// Playground Components:
9-
import ToastCustomOptions from "@/components/playground/toastCustomOptions";
109
import {
1110
ToastVariantExamples,
1211
ToastActionsExamples,
1312
ToastLoadingExample,
1413
} from "@/components/playground/toast";
1514
import { Positions, ThemeExamples } from "@/components/playground/toaster";
1615
import ToastAnimation from "@/components/playground/toastAnimation";
16+
import ToastHeadless from "@/components/playground/toastHeadless";
1717

1818
// Local Components:
1919
import CodeblockMDX from "@/components/codeblock/mdx";
@@ -34,7 +34,7 @@ export function MDX(props: MDXComponentsProps) {
3434
Hero,
3535
Positions,
3636
ThemeExamples,
37-
ToastCustomOptions,
37+
ToastHeadless,
3838
ToastVariantExamples,
3939
ToastActionsExamples,
4040
ToastLoadingExample,

0 commit comments

Comments
 (0)