Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new toast component #94

Merged
merged 4 commits into from
Dec 20, 2023
Merged

feat: add new toast component #94

merged 4 commits into from
Dec 20, 2023

Conversation

lawvs
Copy link
Collaborator

@lawvs lawvs commented Dec 19, 2023

This pull request adds a new toast component to the project.

The toast component allows for displaying temporary messages to the user.

It includes options for different types of toasts (info, success, warn, error) and allows for customizing the duration of the toast.

API

type ToastOptions = {
  type: "info" | "success" | "warn" | "error";
  message: string;
  duration: number;
};

export function toast(message: string): void;
export function toast(message: Partial<ToastOptions>): void;

toast('Hello World');
toast({ message: 'Hello World', type: 'info' });
Screen.Recording.2023-12-20.at.04.42.14.mov

@MichaelYuhe MichaelYuhe added the enhancement New feature or request label Dec 20, 2023
@MichaelYuhe MichaelYuhe merged commit 2780583 into main Dec 20, 2023
1 check passed
@MichaelYuhe MichaelYuhe deleted the feat/simple-toast branch December 21, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants