Skip to content

Commit

Permalink
fix #215 - Fix iconButton pending styles CSS
Browse files Browse the repository at this point in the history
Closes #215
  • Loading branch information
github-actions committed Feb 11, 2021
1 parent fbc7ec7 commit 3443dc0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dassana-io/web-components",
"version": "0.8.9",
"version": "0.9.0",
"publishConfig": {
"registry": "https://npm.pkg.github.com/dassana-io"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/IconButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const useStyles = createUseStyles({
'& $disabled': generateThemedDisabledStyles(dark),
'& $hasBorder': {
...generateThemedHasBorderStyles(dark),
'& $primary': generateThemedPrimaryStyles(dark)
'&$primary': generateThemedPrimaryStyles(dark)
},
'& $iconButton': generateThemedIconBtnStyles(dark)
},
Expand Down
27 changes: 18 additions & 9 deletions src/components/IconButton/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,29 @@ export const generateThemedPendingStyles = (themeType: ThemeType) => {

export const generateThemedPrimaryStyles = (themeType: ThemeType) => {
const {
disabled: { color: disabledColor }
} = themedStyles[themeType]
const {
disabledBgColor,
primaryBackgroundColor,
primaryDisabledBgColor,
primaryDisabledTextColor,
primaryHoverBgColor
} = buttonPalette[themeType]

return {
'&$disabled': {
backgroundColor: primaryDisabledBgColor,
color: primaryDisabledTextColor
},
'&:hover': {
backgroundColor: primaryHoverBgColor,
color: blacks['lighten-80']
'&$circle': {
'&$disabled': {
'&:hover': {
backgroundColor: disabledBgColor,
borderColor: disabledBgColor,
color: disabledColor
},
backgroundColor: disabledBgColor,
color: disabledColor
},
'&:hover': {
backgroundColor: primaryHoverBgColor,
color: blacks['lighten-80']
}
},
backgroundColor: primaryBackgroundColor,
borderColor: 'transparent',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Popover/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { fade } = ColorManipulationTypes

const popoverPalette = {
[dark]: {
accent: manipulateColor(blacks.base, 72, fade),
accent: manipulateColor(blacks['darken-40'], 72, fade),
background: blacks['lighten-10'],
text: {
title: blacks['lighten-80']
Expand Down

0 comments on commit 3443dc0

Please sign in to comment.