{"id":19646090,"url":"https://github.com/xerdi/meteor-toast","last_synced_at":"2025-02-26T23:48:35.189Z","repository":{"id":91316125,"uuid":"566834381","full_name":"Xerdi/meteor-toast","owner":"Xerdi","description":"Admin-LTE Toasts for MeteorJS","archived":false,"fork":false,"pushed_at":"2023-04-21T11:51:17.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-09T21:32:10.784Z","etag":null,"topics":["adminlte","meteor","toast"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xerdi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-16T14:18:19.000Z","updated_at":"2024-02-23T15:51:40.000Z","dependencies_parsed_at":"2025-01-10T11:13:03.025Z","dependency_job_id":null,"html_url":"https://github.com/Xerdi/meteor-toast","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xerdi%2Fmeteor-toast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xerdi%2Fmeteor-toast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xerdi%2Fmeteor-toast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xerdi%2Fmeteor-toast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xerdi","download_url":"https://codeload.github.com/Xerdi/meteor-toast/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240953143,"owners_count":19884024,"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":["adminlte","meteor","toast"],"created_at":"2024-11-11T14:36:46.367Z","updated_at":"2025-02-26T23:48:35.160Z","avatar_url":"https://github.com/Xerdi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meteor Toast\n\nAdmin-LTE Toasts for MeteorJS.\n\n## Installation\n\nAdd the package to your project:\n\n```shell\nmeteor add xerdi:toast\n```\n\nAlso see `xerdi:admin-lte` (requirement).\n\n## Usage\n\nThe toast will by default be placed in `.toasts` which is included in `xerdi:admin-lte`.\nTo change that you can set `Toast.containerSelector` to your container.\n\nTo show a toast, you can do the following:\n```javascript\nconst toast = new Toast({\n    title: 'My Title',\n    icon: 'fas fa-icons',\n    image: '/path/to/image',\n    defaultAction: '/myMessages',\n    createdAt: new Date(),\n    close: false,\n    body: 'Hi \u003cb\u003ethere\u003c/b\u003e!',\n    'class': 'bg-danger'\n});\n\ntoast.show();\ntoast.hide();\n```\n\nThe toast will be destroyed when hidden.\n\nThere are also two short-hands for showing a success message or error message.\n```javascript\nToast.success('A success message', {title: 'Title override'});\ntry {\n    // ... faulty code\n} catch(e) {\n    Toast.error(e);\n    // or\n    Toast.error(e.reason)\n}\n```\nWhen using these short-hands, the toast will be shown in advance.\nThe locale keys of the default titles are `xerdi:toast.errorTitle` and `xerdi:toast.successTitle`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxerdi%2Fmeteor-toast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxerdi%2Fmeteor-toast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxerdi%2Fmeteor-toast/lists"}