Skip to content

Commit

Permalink
feat(css-variables): add button & spinner variables
Browse files Browse the repository at this point in the history
  • Loading branch information
realappie committed Mar 24, 2021
1 parent 407514c commit 1d5afa3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/components/picker-customers/picker-customers.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:host {
display: block;
background: var(--background-color);
--button-hover-background-color: var(--config-picker-button-hover-background-color, rgba(0,0,0,.12));
}

img {
Expand Down Expand Up @@ -67,7 +68,7 @@ button.md {
background-color: transparent;
color: currentColor;
&:hover {
background-color: rgba(0,0,0,.12);
background-color: var(--button-hover-background-color);
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/components/picker-spinner/picker-spinner.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
:host {
display: block;
--spinner-fill: var(--config-picker-spinner-fill, black);
}

svg path {
fill: var(--spinner-fill);
}
4 changes: 2 additions & 2 deletions src/components/picker-spinner/picker-spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export class Spinner {
width: pixelatedSize,
height: pixelatedSize
}}>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width={pixelatedSize} height={pixelatedSize} viewBox="0 0 50 50" style={{ 'enable-background': 'new 0 0 50 50' }} xmlSpace="preserve">
<path fill='black' d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" transform="rotate(360 -4.05439e-8 -4.05439e-8)">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width={pixelatedSize} height={pixelatedSize} viewBox="0 0 50 50" style={{ 'enable-background': 'new 0 0 50 50' }} xmlSpace="preserve">
<path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" transform="rotate(360 -4.05439e-8 -4.05439e-8)">
<animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"></animateTransform>
</path>
</svg>
Expand Down

0 comments on commit 1d5afa3

Please sign in to comment.