-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,6 @@ | |
<title>Tailwind Stimulus Components</title> | ||
<link href="https://unpkg.com/[email protected]/dist/tailwind.min.css" rel="stylesheet"> | ||
<link href="https://unpkg.com/@tailwindcss/[email protected]/dist/forms.min.css" rel="stylesheet"> | ||
<script src="https://unpkg.com/stimulus/dist/stimulus.umd.js"></script> | ||
<script src="https://unpkg.com/tailwindcss-stimulus-components/dist/tailwindcss-stimulus-components.umd.js"></script> | ||
<!-- To use a local copy for testing, uncomment this | ||
<script src="../dist/tailwindcss-stimulus-components.umd.js"></script> | ||
--> | ||
<body> | ||
<div class="container mx-auto p-8"> | ||
<h1 class="text-3xl font-semibold mb-2">Tailwind Stimulus Components Alert Examples</h1> | ||
|
@@ -61,12 +56,28 @@ <h1 class="text-3xl font-semibold mb-2">Tailwind Stimulus Components Alert Examp | |
</div> | ||
</div> | ||
|
||
<script> | ||
|
||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"@hotwired/stimulus": "https://unpkg.com/@hotwired/stimulus/dist/stimulus.js", | ||
"tailwindcss-stimulus-components": "https://unpkg.com/tailwindcss-stimulus-components/dist/tailwindcss-stimulus-components.modern.js" | ||
// Uncomment to use local package with "npx serve" | ||
//"tailwindcss-stimulus-components": "../dist/tailwindcss-stimulus-components.modern.js" | ||
} | ||
} | ||
</script> | ||
|
||
<script type="module"> | ||
import { Application } from "@hotwired/stimulus" | ||
import TailwindcssStimulusComponents from "tailwindcss-stimulus-components" | ||
|
||
(() => { | ||
const application = Stimulus.Application.start(); | ||
const application = Application.start(); | ||
application.register('alert', TailwindcssStimulusComponents.Alert); | ||
})() | ||
</script> | ||
|
||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters