@ivanvanderbyl/ember-material-components-icon-button
v0.77.1-alpha.2
Published
ember-cli addon for @material/icon-button
Downloads
1
Maintainers
Readme
@ivanvanderbyl/ember-material-components-icon-button
ember-cli addon for @material/icon-button
.
Installation
ember install @ivanvanderbyl/ember-material-components-icon-button
Components
This package contains the following top-level components.
mdc-icon-button
Description
An icon that behaves like a button.
Usage
{{mdc-icon-button name disabled=[true|false]}}
Attributes
name
- Name of an icon.disabled
- The button is in a disabled state.
Examples
{{mdc-icon-button "favorite"}}
{{mdc-icon-button "favorite" disabled=true}}
Listening for Button Clicks
Use the click
attribute and the action
helper to listen for button clicks.
{{mdc-icon-button "favorite" click=(action "favorited")}}
mdc-icon-button-toggle
Description
An icon button with toggle states.
Usage
{{mdc-icon-button-toggle iconOn iconOff
on=on
label=label
toggle=toggle}}
Attributes
iconOn
- Name of the icon shown when toggle is on.iconOff
- Name of the icon shown when the toggle is off.on
- Attribute the gets/sets the toggle state.label
- ARIA label for accessibility.toggle
- Action called when the button is toggled.
Examples
{{mdc-icon-button-toggle "favorite" "favorite_border"
on=on
label="Add to favorites"
toggle=(action (mut state))}}