Skip to content

Commit e3712ec

Browse files
committed
basic styling
1 parent 1c1d2f2 commit e3712ec

File tree

5 files changed

+40
-4
lines changed

5 files changed

+40
-4
lines changed

sandbox/index.html

+28-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,37 @@
66
<title>@bedard/tailwindcss-dialogs</title>
77
</head>
88
<body>
9-
<div class="bg-gray-50 h-screen overflow-hidden relative">
9+
<div class="bg-gray-50 h-screen overflow-hidden">
1010
<img class="absolute top-1/2 left-1/2 max-w-none -translate-x-1/2 -translate-y-1/2" src="/beams.jpg" width="1308" />
1111

1212
<div class="absolute inset-0 bg-[url(/grid.svg)] bg-center [mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))]"></div>
13+
14+
<div class="absolute z-10">
15+
<button onclick="document.querySelector('dialog').showModal()">
16+
Click me
17+
</button>
18+
19+
<dialog
20+
class="bg-transparent allow-discrete duration-500 ease-out max-w-screen-sm transition-all opacity-0 -translate-y-6 backdrop:bg-rose-300/0 backdrop:transition-all backdrop:duration-500 backdrop:ease-out open:backdrop:bg-rose-300/20 open:opacity-100 open:translate-y-0 open:from:-translate-y-6 open:from:backdrop:bg-rose-300/0"
21+
onclick="this.close()">
22+
<div
23+
class="bg-gray-100 drop-shadow-xl m-6 gap-6 grid p-6 rounded-lg"
24+
onclick="event.stopPropagation()">
25+
<h2 class="font-medium tracking-wide">@bedard/tailwindcss-dialogs</h2>
26+
27+
<div class="leading-loose text-sm">
28+
Thes utilities enable descrete animation of dialog components. Now, it's time to make something beautiful.
29+
</div>
30+
31+
<div class="flex justify-end text-sm">
32+
<a class="flex gap-x-1 items-center hover:text-rose-500" href="#">
33+
View repository
34+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg>
35+
</a>
36+
</div>
37+
</div>
38+
</dialog>
39+
</div>
1340
</div>
1441

1542
<script type="module" src="/src/main.ts"></script>

sandbox/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@
1414
"tailwindcss": "^3.4.4",
1515
"typescript": "^5.2.2",
1616
"vite": "^5.3.1"
17+
},
18+
"dependencies": {
19+
"@bedard/tailwindcss-dialogs": "link:.."
1720
}
1821
}

sandbox/pnpm-lock.yaml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandbox/src/main.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
import './style.css'
2-
3-
console.log('ok...')

sandbox/tailwind.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import dialogs from '@bedard/tailwindcss-dialogs'
2+
13
/** @type {import('tailwindcss').Config} */
24
export default {
35
content: [
@@ -7,6 +9,8 @@ export default {
79
theme: {
810
extend: {},
911
},
10-
plugins: [],
12+
plugins: [
13+
dialogs,
14+
],
1115
}
1216

0 commit comments

Comments
 (0)