Skip to content

Commit

Permalink
Update docs pages
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Sep 25, 2021
1 parent 7494db6 commit 760cd94
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
25 changes: 18 additions & 7 deletions docs/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>

7 changes: 4 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title>Tailwind Stimulus Components</title>
<link href="https://unpkg.com/tailwindcss/dist/tailwind.min.css" rel="stylesheet">
<link href="https://unpkg.com/@tailwindcss/forms/dist/forms.min.css" rel="stylesheet">
</head>
<body>
<div class="container mx-auto p-8"
data-controller="slideover"
Expand Down Expand Up @@ -301,14 +302,14 @@ <h2 class="text-2xl text-gray-800 font-semibold mb-4">Color Picker and Preview</

(() => {
const application = Application.start();
application.register('alert', TailwindcssStimulusComponents.Alert);
application.register('color-preview', TailwindcssStimulusComponents.ColorPreview);
application.register('dropdown', TailwindcssStimulusComponents.Dropdown);
application.register('modal', TailwindcssStimulusComponents.Modal);
application.register('tabs', TailwindcssStimulusComponents.Tabs);
application.register('popover', TailwindcssStimulusComponents.Popover);
application.register('alert', TailwindcssStimulusComponents.Alert);
application.register('slideover', TailwindcssStimulusComponents.Slideover);
application.register('tabs', TailwindcssStimulusComponents.Tabs);
application.register('toggle', TailwindcssStimulusComponents.Toggle);
application.register('color-preview', TailwindcssStimulusComponents.ColorPreview);
})()
</script>
</body>
Expand Down

0 comments on commit 760cd94

Please sign in to comment.