Skip to content

Commit

Permalink
fix: hover text class
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Aug 29, 2020
1 parent fe758e4 commit 3b41e0a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions ui/components/src/HoverBox/HoverBox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Donut } from 'theme-ui';
import { Donut, Text } from 'theme-ui';
import { HoverBox } from '.';

export default {
Expand All @@ -9,6 +9,7 @@ export default {

export const overview = () => (
<HoverBox label="donut component">
<Donut value={1 / 2} />,
<Donut value={1 / 2} />
<Text>some text</Text>
</HoverBox>
);
4 changes: 3 additions & 1 deletion ui/components/src/HoverBox/HoverBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const HoverBox: FC<HoverBoxProps> = ({ label, children }) => {
return (
<Box variant="hoverbox.container">
<Box variant="hoverbox.inner">{children}</Box>
<Text variant="hoverbox.text">{label}</Text>
<Text variant="hoverbox.text" className="hoverbox-text">
{label}
</Text>
</Box>
);
};
4 changes: 2 additions & 2 deletions ui/components/src/ThemeContext/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,8 @@ export const theme: ControlsTheme = {
minHeight: '100%',
minWidth: 'unset',
pr: 4,
':hover': {
'& > div': {
':hover {': {
'& > .hoverbox-text': {
color: 'mutedText',
},
},
Expand Down

0 comments on commit 3b41e0a

Please sign in to comment.