diff --git a/packages/manager/apps/pci-savings-plan/src/components/Table/ActionCell.scss b/packages/manager/apps/pci-savings-plan/src/components/Table/ActionCell.scss new file mode 100644 index 000000000000..58de07098874 --- /dev/null +++ b/packages/manager/apps/pci-savings-plan/src/components/Table/ActionCell.scss @@ -0,0 +1,31 @@ +// Ugly patch for ODS to manager link like Button in ActionMenu +.menu-item-link { + &::part(link) { + box-sizing: border-box; + width: 100%; + justify-content: left; + padding: 0 6px; + height: 32px; + } + + &:not([is-disabled='true']) { + &::part(link) { + background-size: 0; + + &:hover { + border-radius: 5px; + background-color: var(--ods-color-primary-100); + } + } + } +} + +// Customize +.menu-item-button { + &::part(button) { + width: 100%; + justify-content: left; + height: 32px; + border-radius: 0; + } +} diff --git a/packages/manager/apps/pci-savings-plan/src/components/Table/ActionsCell.tsx b/packages/manager/apps/pci-savings-plan/src/components/Table/ActionsCell.tsx index 8af7c5c80a75..46fcbfddf8a5 100644 --- a/packages/manager/apps/pci-savings-plan/src/components/Table/ActionsCell.tsx +++ b/packages/manager/apps/pci-savings-plan/src/components/Table/ActionsCell.tsx @@ -7,7 +7,7 @@ import { ODS_BUTTON_VARIANT, ODS_ICON_NAME, } from '@ovhcloud/ods-components'; -import { OdsButton, OdsPopover } from '@ovhcloud/ods-components/react'; +import { OdsButton, OdsLink, OdsPopover } from '@ovhcloud/ods-components/react'; import { usePciUrl } from '@ovh-ux/manager-pci-common'; import { ButtonType, @@ -18,6 +18,7 @@ import { SavingsPlanPlanedChangeStatus, SavingsPlanStatus, } from '@/types/api.type'; +import './ActionCell.scss'; interface SavingsPlanActionsCell { onClickEditName: (path: string) => void; @@ -77,11 +78,12 @@ const MenuItems = ({ /> )} - { trackClick({ location: PageLocation.page, @@ -89,11 +91,6 @@ const MenuItems = ({ actionType: 'navigation', actions: ['add_instance'], }); - if (isInstance) { - navigate(`${pciUrl}/instances/new`); - } else { - navigate(`${pciUrl}/rancher/new`); - } }} />