Skip to content

Commit

Permalink
fix(manager-react-component): fix the style of actionMenu
Browse files Browse the repository at this point in the history
Signed-off-by: LIDRISSI Hamid <[email protected]>
  • Loading branch information
seven-amid committed Jan 8, 2025
1 parent fdec1f1 commit e02ab1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useTranslation } from 'react-i18next';
import '../translations/translation';

import { ManagerButton } from '../../../ManagerButton/ManagerButton';

import './index.css';

Check failure on line 12 in packages/manager-react-components/src/components/navigation/menus/action/action.component.tsx

View workflow job for this annotation

GitHub Actions / Lint Code Base

Expected 1 empty line after import statement not followed by another import

Check failure on line 12 in packages/manager-react-components/src/components/navigation/menus/action/action.component.tsx

View workflow job for this annotation

GitHub Actions / Lint Code Base

Expected 1 empty line after import statement not followed by another import
export interface ActionMenuItem {
id: number;
rel?: string;
Expand Down Expand Up @@ -48,14 +48,11 @@ const MenuItem = ({
className: 'w-full action-menu-item',
...item,
};

return (
<div className="-mx-[2px]">
<div className="mx-[2px]">
{!item?.iamActions || item?.iamActions?.length === 0 ? (
<OdsButton {...buttonProps} label={item.label}>
<span slot="start">
<span>{item.label}</span>
</span>
</OdsButton>
<OdsButton {...buttonProps} label={item?.label} />
) : (
<ManagerButton
id={`${id}`}
Expand Down Expand Up @@ -86,7 +83,7 @@ export const ActionMenu: React.FC<ActionMenuProps> = ({

return (
<>
<div key={id} id={`navigation-action-trigger-${id}`}>
<div className="w-fit" key={id} id={`navigation-action-trigger-${id}`}>
<OdsButton
data-testid="navigation-action-trigger-action"
className="action-menu-btn"
Expand All @@ -106,7 +103,7 @@ export const ActionMenu: React.FC<ActionMenuProps> = ({
/>
</div>
<OdsPopover
className="py-[8px] px-0 overflow-hidden"
className="py-[8px] overflow-hidden"
triggerId={`navigation-action-trigger-${id}`}
with-arrow
>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ods-button.action-menu-item::part(button) {
width: 100%;
justify-content: left;
}

0 comments on commit e02ab1f

Please sign in to comment.