{"id":22877334,"url":"https://github.com/rqbazan/zeit-toast-clone","last_synced_at":"2025-05-06T21:47:12.757Z","repository":{"id":36660298,"uuid":"206137747","full_name":"rqbazan/zeit-toast-clone","owner":"rqbazan","description":"🗨 Inspired by https://vercel.com/design/toast","archived":false,"fork":false,"pushed_at":"2022-03-27T01:12:08.000Z","size":494,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T16:47:19.752Z","etag":null,"topics":["notifications","react-spring","toast"],"latest_commit_sha":null,"homepage":"https://zeit-toast-clone.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rqbazan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-03T17:46:38.000Z","updated_at":"2023-03-13T02:29:50.000Z","dependencies_parsed_at":"2022-08-08T16:30:33.695Z","dependency_job_id":null,"html_url":"https://github.com/rqbazan/zeit-toast-clone","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rqbazan%2Fzeit-toast-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rqbazan%2Fzeit-toast-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rqbazan%2Fzeit-toast-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rqbazan%2Fzeit-toast-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rqbazan","download_url":"https://codeload.github.com/rqbazan/zeit-toast-clone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776476,"owners_count":21802461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notifications","react-spring","toast"],"created_at":"2024-12-13T15:34:01.938Z","updated_at":"2025-05-06T21:47:12.739Z","avatar_url":"https://github.com/rqbazan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZEIT TOAST CLONE\n\nA front-end challenge required by myself 😅, I worked with animation effects\npowered by the awesome `react-spring` library. 😍\n\n## Basic Usage\n\nInstall the library and its peer dependencies\n\n```bash\nyarn add zeit-toast-clone\nnpx install-peerdeps zeit-toast-clone\n```\n\nImport and render the `NotifierPortal` component in the root of your\napplication, as well as the styles.\n\n```jsx\nimport { NotifierPortal } from 'zeit-toast-clone'\nimport 'zeit-toast-clone/styles.css'\n\nconst App = () =\u003e {\n  return \u003cNotifierPortal /\u003e\n}\n```\n\nImport and use the `notifier` wherever you want.\n\n```jsx\nimport notifier from 'zeit-toast-clone'\n\nconst Component = () =\u003e {\n  return (\n    \u003cbutton onClick={() =\u003e notifier.info('Say hello to my little friend')}\u003eShow message\u003c/button\u003e\n  )\n}\n```\n\n## API\n\n### `\u003cNotifierPortal /\u003e`\n\n| PropName    | Type             | Default        | Description                                         |\n| ----------- | ---------------- | -------------- | --------------------------------------------------- |\n| `component` | `ReactComponent` | `Notification` | The notification component to show the messages     |\n| `height`    | `number`         | `64`           | Height of the notification _(needed for animation)_ |\n| `offset`    | `number`         | `16`           | Offset of the notification _(needed for animation)_ |\n\n### `notifier`\n\n| Attribute | Type                        | Description                 |\n| --------- | --------------------------- | --------------------------- |\n| `info`    | `(message: string) =\u003e void` | Show an info notification   |\n| `error`   | `(message: string) =\u003e void` | Show an error notification  |\n| `success` | `(message: string) =\u003e void` | Show a success notification |\n| `warning` | `(message: string) =\u003e void` | Show a warning notification |\n\n### `\u003cNotification /\u003e`\n\n\u003e This component wasn't created to be customizable, I exposed it just for demo\n\u003e purposes on the storybook package.\n\n| PropName  | Type                                          | Description                  |\n| --------- | --------------------------------------------- | ---------------------------- |\n| `kind`    | `'error' \\| 'warning' \\| 'success' \\| 'info'` | Flavor of the notification   |\n| `message` | `string`                                      | Content displayed as message |\n\n## Customize\n\nThe first level of customization is possible through the props of\n`\u003cNotifierPortal /\u003e`, but also\n[there is a few CSS classes and variables.](https://github.com/rqbazan/zeit-toast-clone/blob/master/packages/library/styles.css)\n\n## Demo\n\nI created a storybook application dedicated to the demo:\nhttps://zeit-toast-clone.vercel.app\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frqbazan%2Fzeit-toast-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frqbazan%2Fzeit-toast-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frqbazan%2Fzeit-toast-clone/lists"}