Skip to content

Commit

Permalink
fix(batchToolTips): make tooltips on batch visible (#13328)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
AustinGitHub and kodiakhq[bot] authored Mar 13, 2023
1 parent 997d7e2 commit 4871a96
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import { action } from '@storybook/addon-actions';
import { TrashCan, Save, Download } from '@carbon/icons-react';
import { TrashCan, Save, Download, Add } from '@carbon/icons-react';

import Button from '../../Button';
import DataTable, {
Expand Down Expand Up @@ -89,6 +89,18 @@ export const Default = () => (
Delete
</TableBatchAction>
<TableBatchAction
hasIconOnly
iconDescription="Add"
tooltipPosition="bottom"
tabIndex={batchActionProps.shouldShowBatchActions ? 0 : -1}
renderIcon={Add}
onClick={batchActionClick(selectedRows)}>
Delete
</TableBatchAction>
<TableBatchAction
hasIconOnly
iconDescription="Save"
tooltipPosition="bottom"
tabIndex={batchActionProps.shouldShowBatchActions ? 0 : -1}
renderIcon={Save}
onClick={batchActionClick(selectedRows)}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,9 @@
.#{$prefix}--batch-actions:focus {
@include focus-outline;
}

// 200% to allow tooltips
.#{$prefix}--batch-actions--active {
overflow: auto hidden;
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
clip-path: polygon(0 0, 200% 0, 200% 200%, 0 200%);
pointer-events: all;
transform: translate3d(0, 0, 0);
}
Expand Down

0 comments on commit 4871a96

Please sign in to comment.