WebUI: create paper-button replacement, cr-button
As part of the MD refresh, the WebUI button style changed dramatically. We opted to reuse the paper-button and overriding the styling. The button logic is fairly straightforward. That said, paper-button use 5 Polymer behaviors. IronA11yKeysBehavior: a different way to handle keybindings. IronButtonState: supports toggling and whether focus was from a keyboard. IronControlState: handles disabling a control with the |disabled| property. PaperButtonBehaviorImpl: supports button elevation based on the button state (focused, pressed, disabled and normal). PaperRippleBehavior: lazily creates paper-ripple and forwards noink property to paper-ripple. cr-button applies the MD refresh style directly and implements only the functionality that is required. It makes use of the PaperRippleBehavior and cr.ui.FocusOutlineManager (used in place of IronButtonState which also supports toggling). Bug: 967793 Change-Id: I0417974fcc69467be249920410b5ae77bdc529db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632894Reviewed-by:Demetrios Papadopoulos <dpapad@chromium.org> Commit-Queue: Esmael El-Moslimany <aee@chromium.org> Cr-Commit-Position: refs/heads/master@{#665213}
Showing
Please register or sign in to comment