Skip to content

Commit 6799221

Browse files
authored
docs: Demonstrate that action case is preserved (#137)
`greetSomeone` is not converted to `greet-someone`, but remains `greetSomeone`
1 parent f56a583 commit 6799221

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

docs/_guide/actions.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Remember! Actions are _automatically_ bound using the `@controller` decorator. T
1515
<div class="">
1616

1717
<!-- annotations
18-
data-action "click.*": Will call `greet()` when clicked
18+
data-action "click.*": Will call `greetSomeone()` when clicked
1919
-->
2020

2121
```html
@@ -26,8 +26,8 @@ data-action "click.*": Will call `greet()` when clicked
2626
>
2727

2828
<button
29-
data-action="click:hello-world#greet">
30-
Greet
29+
data-action="click:hello-world#greetSomeone">
30+
Greet Someone
3131
</button>
3232

3333
<span
@@ -40,7 +40,7 @@ data-action "click.*": Will call `greet()` when clicked
4040
<div class="ml-4">
4141

4242
<!-- annotations
43-
greet: All public methods can be called with `data-action`
43+
greetSomeone: All public methods can be called with `data-action`
4444
-->
4545

4646
```js
@@ -51,7 +51,7 @@ class HelloWorldElement extends HTMLElement {
5151
@target name: HTMLElement
5252
@target output: HTMLElement
5353

54-
greet() {
54+
greetSomeone() {
5555
this.output.textContent =
5656
`Hello, ${this.name.value}!`
5757
}
@@ -92,12 +92,12 @@ data-action: Fires all of these methods depending on the event
9292

9393
<button
9494
data-action="
95-
click:hello-world#greet
95+
click:hello-world#greetSomeone
9696
click:analytics-tracking#click
9797
hover:analytics-tracking#hover
9898
"
9999
>
100-
Greet
100+
Greet Someone
101101
</button>
102102
</hello-world>
103103
</analytics-tracking>

0 commit comments

Comments
 (0)