Explorar el Código

Update transition.md - changed span to div (#4215)

With a span, the transition effect is not obvious because the element doesn't move so the documentation looks broken.

I confirmed this in MacOS for Firefox, Chrome, and Safari.
Bob Clewell hace 1 año
padre
commit
60cf5a841a
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      packages/docs/src/en/directives/transition.md

+ 4 - 4
packages/docs/src/en/directives/transition.md

@@ -21,9 +21,9 @@ The simplest way to achieve a transition using Alpine is by adding `x-transition
 <div x-data="{ open: false }">
     <button @click="open = ! open">Toggle</button>
 
-    <span x-show="open" x-transition>
+    <div x-show="open" x-transition>
         Hello 👋
-    </span>
+    </div>
 </div>
 ```
 
@@ -32,9 +32,9 @@ The simplest way to achieve a transition using Alpine is by adding `x-transition
     <div x-data="{ open: false }">
         <button @click="open = ! open">Toggle</button>
 
-        <span x-show="open" x-transition>
+        <div x-show="open" x-transition>
             Hello 👋
-        </span>
+        </div>
     </div>
 </div>
 <!-- END_VERBATIM -->