Skip to content

Commit ecf0105

Browse files
committed
chore: update test(update tailwind config, add media query example, fix error classNames)
1 parent a89038a commit ecf0105

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

test/index.html

+19-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
<div
7474
id="container"
75-
class="max-w-6xl px-4 md:px-16 lg:px-32 xl:mx-auto flex flex-col justify-center [&>h1]:headline-large [&>h1+*]:border [&>h1+*]:border-outline [&>h1+*]:shape-medium [&>h1+*]:bg-surface-container-lowest [&>h1]:mt-16 [&>h1]:mb-8 [&>h1+*]:p-4 [&>h1+*]:overflow-auto py-32"
75+
class="max-w-6xl px-4 md:px-16 lg:px-32 xl:mx-auto flex flex-col justify-center [&>h1]:text-headline-large [&>h1+*]:border [&>h1+*]:border-outline [&>h1+*]:shape-medium [&>h1+*]:bg-surface-container-lowest [&>h1]:mt-16 [&>h1]:mb-8 [&>h1+*]:p-4 [&>h1+*]:overflow-auto py-32"
7676
>
7777
<p class="title-medium text-on-surface-variant">
7878
tailwindcss-material-tokens
@@ -107,6 +107,14 @@ <h1>Elevation</h1>
107107
<span class="w-24 h-24 inline-block elevation-5"></span>
108108
</div>
109109

110+
<h1>Border / Outline</h1>
111+
<div class="flex gap-10 [&>span]:w-24 [&>span]:h-24 [&>span]:inline-block">
112+
<span class="border border-outline">border-outline</span>
113+
<span class="border border-outline-variant">border-outline-variant</span>
114+
<span class="outline outline-outline">outline-outline</span>
115+
<span class="outline outline-outline-variant">outline-outline-variant</span>
116+
</div>
117+
110118
<h1>Shape</h1>
111119
<div
112120
class="flex gap-10 items-stretch [&>div>span]:w-10 [&>div>span]:h-10 [&>div>span]:inline-block [&>div>span]:bg-primary">
@@ -171,7 +179,7 @@ <h1>Shape</h1>
171179

172180
<h1>Color</h1>
173181
<div
174-
class="flex flex-col gap-4 [&>div]:flex [&>div>span]:label-large [&>div>span]:min-w-20 [&>div>span]:h-10 [&>div>span]:inline-flex [&>div>span]:items-center [&>div>span]:justify-center">
182+
class="flex flex-col gap-4 [&>div]:flex [&>div>span]:text-label-large [&>div>span]:min-w-20 [&>div>span]:h-10 [&>div>span]:inline-flex [&>div>span]:items-center [&>div>span]:justify-center">
175183
<div>
176184
<span class="bg-primary text-on-primary">P</span>
177185
<span class="bg-secondary text-on-secondary">S</span>
@@ -247,6 +255,15 @@ <h1>Motion</h1>
247255
<span class="bg-tertiary-fixed-dim move animation-easing-standard-accelerate">
248256
</span>
249257
</div>
258+
259+
<h1>Window Media Query</h1>
260+
<div class="[&>span]:w-full [&>span]:h-10 [&>span]:grid [&>span]:items-center [&>span]:justify-center">
261+
<span class="compact:bg-primary compact:text-on-primary">Compact [max-width: 600px]</span>
262+
<span class="medium:bg-primary medium:text-on-primary">Medium [max-width: 8400px]</span>
263+
<span class="expanded:bg-primary expanded:text-on-primary">Expanded [max-width: 1200px]</span>
264+
<span class="large:bg-primary large:text-on-primary">Large [max-width: 1600px]</span>
265+
<span class="extra-large:bg-primary extra-large:text-on-primary">ExtraLarge [min-width: 1600px]</span>
266+
</div>
250267
</div>
251268

252269

test/tailwind.config.ts

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1-
// import { provideAll } from '../src/index'
2-
import { provideAll } from '../build/index'
1+
import { provideBorder, provideColor, provideElevation, provideMotion, provideShape, provideTypography, provideWindowMediaQuery } from '../src/index'
32

4-
const all = provideAll()
3+
const color = provideColor({})
4+
const elevation = provideElevation({})
5+
const motion = provideMotion()
6+
const shape = provideShape()
7+
const typo = provideTypography()
8+
const border = provideBorder({})
9+
const mq = provideWindowMediaQuery()
510

611
/** @type {import('tailwindcss').Config} */
712
export default {
813
content: [
914
'./index.html'
1015
],
1116
plugins: [
12-
...all.allPlugins()
17+
color.getPlugin(),
18+
elevation.getPlugin(),
19+
motion.getPlugin(),
20+
shape.getPlugin(),
21+
typo.getPlugin(),
22+
border.getPlugin(),
23+
mq.getPlugin()
1324
],
1425
}
1526

0 commit comments

Comments
 (0)