Skip to content

Commit

Permalink
fix(button): clean up clear button for reuse across elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed May 7, 2020
1 parent 13916ab commit 4c71eb1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/button/src/spectrum-clear-button.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ THIS FILE IS MACHINE GENERATED. DO NOT EDIT */
var(--spectrum-alias-icon-color)
);
}
.spectrum-ClearButton--small {
#button > .spectrum-Icon {
/* .spectrum-ClearButton>.spectrum-Icon */
margin: 0 auto; /* .spectrum-ClearButton>.spectrum-Icon */
margin: 0;
}
:host([small]) #button {
/* .spectrum-ClearButton--small */
width: var(
--spectrum-clearbutton-small-width,
Expand Down
5 changes: 5 additions & 0 deletions packages/button/src/spectrum-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ module.exports = {
},
focus: '#button',
attributes: [
{
selector: '.spectrum-ClearButton--small',
type: 'boolean',
name: 'small',
},
{
type: 'enum',
name: 'variant',
Expand Down

0 comments on commit 4c71eb1

Please sign in to comment.