Skip to content

Commit

Permalink
Only hiding completely hidden actions when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos committed Sep 6, 2018
1 parent 64f6d71 commit c0afae7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
9 changes: 4 additions & 5 deletions src-docs/src/views/tables/actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
EuiFlexItem,
EuiSwitch,
EuiSpacer,
EuiText,
} from '../../../../../src/components';

/*
Expand Down Expand Up @@ -145,17 +144,17 @@ export class Table extends Component {
? [{
render: (item) => {
return (
<EuiText color="secondary" onClick={() => this.cloneUser(item)}>
<EuiLink color="secondary" onClick={() => this.cloneUser(item)}>
Clone
</EuiText>
</EuiLink>
);
}
}, {
render: (item) => {
return (
<EuiText color="danger" onClick={() => this.deleteUser(item)}>
<EuiLink color="danger" onClick={() => this.deleteUser(item)}>
Delete
</EuiText>
</EuiLink>
);
}
}]
Expand Down
18 changes: 11 additions & 7 deletions src/components/table/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,25 @@
.euiTableCellContent__hoverItem {
margin-left: $euiSizeS;
flex-shrink: 0;
opacity: 0.25;
opacity: 0.5;
filter: grayscale(100%);
transition: all $euiAnimSpeedNormal $euiAnimSlightResistance;

.euiTableRow:hover &:not(:disabled),
&:hover:not(:disabled),
&:focus:not(:disabled) {
.euiTableRow:hover &,
&:disabled,
&:hover,
&:focus {
opacity: 1;
filter: grayscale(0%);
}
}

.euiTableCellContent__hoverItem:disabled,
.euiTableCellContent__hoverItem button:disabled,
.expandedItemActions__completelyHide {
.expandedItemActions__completelyHide,
.expandedItemActions__completelyHide:disabled,
.expandedItemActions__completelyHide:disabled:hover,
.expandedItemActions__completelyHide:disabled:focus,
.euiTableRow:hover & .expandedItemActions__completelyHide:disabled {
filter: grayscale(0%);
opacity: 0;
}
}
Expand Down

0 comments on commit c0afae7

Please sign in to comment.