Skip to content
Permalink
Browse files

fix(note): make actionBar hover gray03 instead of white

  • Loading branch information...
jaketrent committed Jun 20, 2019
1 parent 4338e04 commit e214f4a9f7846441f34c3e9c3e0877241f25d42b
Showing with 20 additions and 10 deletions.
  1. +3 −0 packages/note/src/css/index.js
  2. +17 −10 packages/note/src/react/index.js
@@ -70,6 +70,9 @@ export default {
'&:hover, &:active': { color: core.colors.white },
'& + &': { marginLeft: core.layout.spacingSmall }
},
[`.psds-note__action.psds-theme--${themeNames.light}`]: {
'&:hover, &:active': { color: core.colors.gray03 }
},

'.psds-note__aside': {
marginRight: core.layout.spacingMedium
@@ -29,7 +29,11 @@ const styles = {
!props.hasHeading &&
glamor.css(css['.psds-note__action-bar--meta-sibling'])
),
action: _ => glamor.css(css['.psds-note__action']),
action: themeName =>
glamor.compose(
glamor.css(css['.psds-note__action']),
glamor.css(css[`.psds-note__action.psds-theme--${themeName}`])
),
aside: _ => glamor.css(css['.psds-note__aside']),
contents: themeName =>
glamor.compose(
@@ -158,15 +162,18 @@ ActionBar.propTypes = {
children: PropTypes.arrayOf(PropTypes.node)
}

const Action = React.forwardRef((props, ref) => (
<button
ref={ref}
{...styles.action()}
{...filterReactProps(props, { tagName: 'button' })}
>
{props.icon}
</button>
))
const Action = React.forwardRef((props, ref) => {
const themeName = useTheme()
return (
<button
ref={ref}
{...styles.action(themeName)}
{...filterReactProps(props, { tagName: 'button' })}
>
{props.icon}
</button>
)
})

Action.displayName = 'Note.Action'
Action.propTypes = {

0 comments on commit e214f4a

Please sign in to comment.
You can’t perform that action at this time.