Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danie-ramdhani committed Apr 21, 2023
1 parent df2e8dc commit f10cf9b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Toast Message 🍞
# Toast Notification 🍞

<p align="left">
<a href="https://www.npmjs.com/package/javascript-toast-notification"><img src="https://img.shields.io/npm/v/javascript-toast-notification.svg" alt="NPM Release"></a>
<a href="https://www.npmjs.com/package/javascript-toast-notification"><img src="https://img.shields.io/npm/v/toast-notification-js.svg" alt="NPM Release"></a>
<a href="https://github.com/danie-ramdhani/toast-notification/releases"><img src="https://img.shields.io/github/release/danie-ramdhani/toast-notification?color=green" alt="Latest Release"></a>
</p>

Expand All @@ -16,21 +16,21 @@ You can <a href="https://danie-ramdhani.github.io/toast-notification/">click her
You can install it via NPM

```sh
npm i javascript-toast-notification
npm i toast-notification-js
```

or you can include it on you page via CDN

on head tag:

```html
<link rel="stylesheet" href="https://unpkg.com/javascript-toast-notification/dist/toast-notification.min.css" />
<link rel="stylesheet" href="https://unpkg.com/toast-notification-js/dist/toast-notification.min.css" />
```

on body tag:

```html
<script src="https://unpkg.com/javascript-toast-notification/dist/toast-notification.min.js"></script>
<script src="https://unpkg.com/toast-notification-js/dist/toast-notification.min.js"></script>
```

## ⏩ Quick Start:
Expand Down
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Toast Message Example</title>
<title>Toast Notification Example</title>

<script src="https://cdn.tailwindcss.com"></script>

Expand Down Expand Up @@ -115,7 +115,7 @@
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>
</head>
<body class="p-4 text-slate-700 dark:text-slate-200 dark:bg-slate-950">
<h1 class="mb-4 text-4xl font-bold capitalize">toast message</h1>
<h1 class="mb-4 text-4xl font-bold capitalize">toast notification</h1>
<button
x-data="{
toggleIcon: localStorage.theme ?? 'dark',
Expand Down Expand Up @@ -258,10 +258,10 @@ <h1 class="mb-4 text-4xl font-bold capitalize">toast message</h1>
<h3 class="mb-4 text-xl">Generated code:</h3>
<code class="select-all">
<span class="block"
><span class="text-sky-400">var</span> <span class="text-cyan-400">createToastMessage</span> =
<span class="text-sky-400">new</span> <span class="text-amber-500">ToastMessage</span>();</span
><span class="text-sky-400">var</span> <span class="text-cyan-400">createToastNotification</span> =
<span class="text-sky-400">new</span> <span class="text-amber-500">ToastNotification</span>();</span
>
<span class="inline text-cyan-400">createToastMessage</span>.<span class="text-amber-500">create</span>
<span class="inline text-cyan-400">createToastNotification</span>.<span class="text-amber-500">create</span>
<span class="inline">({</span>
<template x-for="(value, key) in data">
<div
Expand Down Expand Up @@ -314,9 +314,9 @@ <h3 class="mb-4 text-xl">Generated code:</h3>
<!-- <script src="https://unpkg.com/javascript-toast-notification/dist/toast-notification.min.js"></script> -->

<script>
var toastMessage = ToastNotification();
var toastNotification = ToastNotification();
window.addEventListener("showToastNotification", (event) => {
toastMessage.create({
toastNotification.create({
classList: event.detail.classList,
title: event.detail.title,
message: event.detail.message,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "javascript-toast-notification",
"name": "toast-notification-js",
"version": "1.0.0",
"description": "A simple notification with better customization",
"main": "dist/toast-notification.min.js",
Expand Down

0 comments on commit f10cf9b

Please sign in to comment.