Browse Source

Update data.md (#1753)

Fix the `x-show` variable in the second example in the `Single-element components` section.
fgb4101 3 years ago
parent
commit
b2cd84c25b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/docs/src/en/directives/data.md

+ 1 - 1
packages/docs/src/en/directives/data.md

@@ -133,7 +133,7 @@ Sometimes you may only have a single element inside your Alpine component, like
 In these cases, you can declare `x-data` directly on that single element:
 
 ```html
-<button x-data="{ open: true }" @click="open = false" x-show="show">
+<button x-data="{ open: true }" @click="open = false" x-show="open">
     Hide Me
 </button>
 ```