Skip to content

Commit

Permalink
refactor: adjust position of actions toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
veinfors committed Mar 21, 2023
1 parent b7d38ce commit 4c21296
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apis/nucleus/src/components/ActionsToolbar.jsx
Expand Up @@ -79,10 +79,6 @@ const ActionsGroup = React.forwardRef(
);

const popoverStyle = { pointerEvents: 'none' };
const popoverAnchorOrigin = {
vertical: 'top',
horizontal: 'right',
};
const popoverTransformOrigin = {
vertical: 'bottom',
horizontal: 'right',
Expand Down Expand Up @@ -123,6 +119,11 @@ function ActionsToolbar({
const theme = useTheme();
const dividerStyle = useMemo(() => ({ margin: theme.spacing(0.5, 0) }));

const popoverAnchorOrigin = {
vertical: 15,
horizontal: (popover.anchorEl?.clientWidth ?? 0) - 7,
};

const getEnabledButton = (last) => {
const actionsElement = actionsRef.current || actionsRefMock;
if (!actionsElement) return null;
Expand Down

0 comments on commit 4c21296

Please sign in to comment.