-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(addon/components/paper-switch): converts to a glimmer component.
- Loading branch information
1 parent
82495fa
commit 45b2ca7
Showing
2 changed files
with
191 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
{{! template-lint-disable no-curly-component-invocation }} | ||
<div class="md-switch-bar"></div> | ||
<div class="md-container"> | ||
<div class="md-bar"></div> | ||
<div class="md-thumb-container" style={{this.thumbContainerStyle}}> | ||
<div class="md-thumb"> | ||
<PaperRipple @center={{true}} @fitRipple={{true}}/> | ||
<md-switch | ||
class='paper-switch md-default-theme | ||
{{if @accent " md-accent"}} | ||
{{if @primary " md-primary"}} | ||
{{if @warn " md-warn"}} | ||
{{if this.dragging " md-dragging"}} | ||
{{if this.focused " md-focused"}} | ||
{{if this.value " md-checked"}} | ||
{{@class}}' | ||
disabled={{this.disabled}} | ||
tabindex={{if this.disabled '-1' '0'}} | ||
{{did-insert this.didInsertNode}} | ||
{{did-update this.didUpdateNode this.disabled this._switchContainerHammer}} | ||
{{will-destroy this.willDestroyNode}} | ||
{{on 'keypress' this.handleKeyPress}} | ||
...attributes | ||
> | ||
<div class='md-switch-bar'></div> | ||
<div class='md-container'> | ||
<div class='md-bar'></div> | ||
<div class='md-thumb-container' style={{this.thumbContainerStyle}}> | ||
<div class='md-thumb'> | ||
<PaperRipple @center={{true}} @fitRipple={{true}} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{#if (has-block)}} | ||
<div class="md-label"> | ||
{{yield}} | ||
</div> | ||
{{else}} | ||
<div class="md-label"> | ||
{{@label}} | ||
</div> | ||
{{/if}} | ||
{{#if (has-block)}} | ||
<div class='md-label'> | ||
{{yield}} | ||
</div> | ||
{{else}} | ||
<div class='md-label'> | ||
{{@label}} | ||
</div> | ||
{{/if}} | ||
</md-switch> |
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