mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
@@ -70,6 +70,15 @@ func TestClassCollector(t *testing.T) {
|
||||
{"Alpine bind 4", `<div x-bind:class="{ 'text-gray-800': !checked,
|
||||
'text-white': checked }"></div>`, f("div", "text-gray-800 text-white", "")},
|
||||
|
||||
{"Alpine bind 5", `<a x-bind:class="{
|
||||
'text-a': a && b,
|
||||
'text-b': !a && b || c,
|
||||
'pl-3': a === 1,
|
||||
pl-2: b == 3,
|
||||
'text-gray-600': (a > 1)
|
||||
|
||||
}" class="block w-36 cursor-pointer pr-3 no-underline capitalize"></a>`, f("a", "block capitalize cursor-pointer no-underline pl-2 pl-3 pr-3 text-a text-b text-gray-600 w-36", "")},
|
||||
|
||||
{"Vue bind", `<div v-bind:class="{ active: isActive }"></div>`, f("div", "active", "")},
|
||||
} {
|
||||
c.Run(test.name, func(c *qt.C) {
|
||||
|
Reference in New Issue
Block a user