-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: the toggle switch explicit on and off (#67)
* Simplify clicks, no idea why click in label does not fire * Fix explicit on and off toggles
- Loading branch information
1 parent
a57cd7c
commit b756aba
Showing
8 changed files
with
57 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,53 @@ | ||
{{#if hasBlock}} | ||
{{yield (hash | ||
switch=(component 'x-toggle-switch' onClick=(action 'onClick') | ||
onChangeValue=(action 'setToValue') | ||
value=value | ||
theme=theme | ||
size=size | ||
switch=(component 'x-toggle-switch' | ||
disabled=disabled | ||
toggled=toggled | ||
forId=forId | ||
name=name | ||
offLabel=offLabel | ||
onLabel=onLabel | ||
forId=forId) | ||
size=size | ||
sendToggle=(action 'sendToggle') | ||
theme=theme | ||
toggled=toggled | ||
value=value) | ||
offLabel=(component 'x-toggle-label' | ||
label=offLabel | ||
value=false | ||
sendToggle=(action 'sendToggle') | ||
show=showLabels | ||
switchId=forId) | ||
switchId=forId | ||
value=false) | ||
onLabel=(component 'x-toggle-label' | ||
label=onLabel | ||
value=true | ||
sendToggle=(action 'sendToggle') | ||
show=showLabels | ||
switchId=forId) | ||
switchId=forId | ||
value=true) | ||
)}} | ||
{{else}} | ||
{{x-toggle-label | ||
label=offLabel | ||
value=false | ||
sendToggle=(action 'sendToggle') | ||
show=showLabels | ||
switchId=forId}} | ||
switchId=forId | ||
value=false}} | ||
|
||
{{x-toggle-switch onClick=(action 'onClick') | ||
onChangeValue=(action 'setToValue') | ||
value=value | ||
theme=theme | ||
size=size | ||
{{x-toggle-switch | ||
disabled=disabled | ||
toggled=toggled | ||
forId=forId | ||
name=name | ||
offLabel=offLabel | ||
onLabel=onLabel | ||
forId=forId}} | ||
sendToggle=(action 'sendToggle') | ||
size=size | ||
theme=theme | ||
toggled=toggled | ||
value=value}} | ||
|
||
{{x-toggle-label | ||
label=onLabel | ||
value=true | ||
sendToggle=(action 'sendToggle') | ||
show=showLabels | ||
switchId=forId}} | ||
switchId=forId | ||
value=true}} | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters