Fix active and hover status

This commit is contained in:
dominik-zeglen 2019-09-16 15:33:24 +02:00
parent 5c6e898806
commit 6bc5a81ea4
2 changed files with 14 additions and 7 deletions

View file

@ -21,9 +21,15 @@ const useStyles = makeStyles((theme: Theme) => ({
display: "inline-block"
},
labelContainer: {
"&:hover": {
color: theme.palette.text.primary
},
display: "flex",
height: 24
},
labelContainerActive: {
color: theme.palette.text.primary
},
labelContainerCenter: {
justifyContent: "center"
},
@ -58,6 +64,7 @@ const TableCellHeader: React.FC<TableCellHeaderProps> = props => {
<TableCell {...rest} className={classNames(classes.root, className)}>
<div
className={classNames(classes.labelContainer, {
[classes.labelContainerActive]: !!direction && !!arrowPosition,
[classes.labelContainerCenter]: textAlign === "center",
[classes.labelContainerRight]: textAlign === "right"
})}

View file

@ -4613,7 +4613,7 @@ exports[`Storyshots Generics / Table header ascending 1`] = `
scope="col"
>
<div
class="Hook-labelContainer-id"
class="Hook-labelContainer-id Hook-labelContainerActive-id"
>
<div
class="Hook-label-id"
@ -4646,7 +4646,7 @@ exports[`Storyshots Generics / Table header ascending 1`] = `
scope="col"
>
<div
class="Hook-labelContainer-id"
class="Hook-labelContainer-id Hook-labelContainerActive-id"
>
<div
class="Hook-label-id"
@ -4702,7 +4702,7 @@ exports[`Storyshots Generics / Table header descending 1`] = `
scope="col"
>
<div
class="Hook-labelContainer-id"
class="Hook-labelContainer-id Hook-labelContainerActive-id"
>
<div
class="Hook-label-id"
@ -93854,7 +93854,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `
scope="col"
>
<div
class="Hook-labelContainer-id"
class="Hook-labelContainer-id Hook-labelContainerActive-id"
>
<div
class="Hook-label-id"
@ -93891,7 +93891,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `
scope="col"
>
<div
class="Hook-labelContainer-id"
class="Hook-labelContainer-id Hook-labelContainerActive-id"
>
<div
class="Hook-label-id"
@ -93905,7 +93905,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `
scope="col"
>
<div
class="Hook-labelContainer-id"
class="Hook-labelContainer-id Hook-labelContainerActive-id"
>
<div
class="Hook-label-id"
@ -95479,7 +95479,7 @@ exports[`Storyshots Views / Products / Product list loading 1`] = `
scope="col"
>
<div
class="Hook-labelContainer-id"
class="Hook-labelContainer-id Hook-labelContainerActive-id"
>
<div
class="Hook-label-id"