Update SettingsObjectAboutSection.tsx changed "Disable" CTA to "Deact… (#4175)
* Update SettingsObjectAboutSection.tsx changed "Disable" CTA to "Deactivate" * Update SettingsObjects.tsx Additional changes: Disabled sections to inactive * Update SettingsObjectAboutSection.tsx I think you meant changing Disable to Deactivate * Update and rename SettingsObjectDisabledMenuDropDown.tsx to SettingsObjectInactiveMenuDropDown.tsx additional changes to #4153 * Update SettingsObjects.tsx * Update and rename SettingsObjectDisabledMenuDropDown.stories.tsx to SettingsObjectInactiveMenuDropDown.stories.tsx * fix typescript errors * respect issue requirements --------- Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
@ -6,20 +6,20 @@ import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/Drop
|
||||
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
|
||||
import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem';
|
||||
|
||||
type SettingsObjectDisabledMenuDropDownProps = {
|
||||
type SettingsObjectInactiveMenuDropDownProps = {
|
||||
isCustomObject: boolean;
|
||||
onActivate: () => void;
|
||||
onErase: () => void;
|
||||
scopeKey: string;
|
||||
};
|
||||
|
||||
export const SettingsObjectDisabledMenuDropDown = ({
|
||||
export const SettingsObjectInactiveMenuDropDown = ({
|
||||
onActivate,
|
||||
scopeKey,
|
||||
onErase,
|
||||
isCustomObject,
|
||||
}: SettingsObjectDisabledMenuDropDownProps) => {
|
||||
const dropdownId = `${scopeKey}-settings-object-disabled-menu-dropdown`;
|
||||
}: SettingsObjectInactiveMenuDropDownProps) => {
|
||||
const dropdownId = `${scopeKey}-settings-object-inactive-menu-dropdown`;
|
||||
|
||||
const { closeDropdown } = useDropdown(dropdownId);
|
||||
|
||||
@ -3,7 +3,7 @@ import { expect, fn, userEvent, within } from '@storybook/test';
|
||||
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
|
||||
import { SettingsObjectDisabledMenuDropDown } from '../SettingsObjectDisabledMenuDropDown';
|
||||
import { SettingsObjectInactiveMenuDropDown } from '../SettingsObjectInactiveMenuDropDown';
|
||||
|
||||
const handleActivateMockFunction = fn();
|
||||
const handleEraseMockFunction = fn();
|
||||
@ -16,11 +16,11 @@ const ClearMocksDecorator: Decorator = (Story, context) => {
|
||||
return <Story />;
|
||||
};
|
||||
|
||||
const meta: Meta<typeof SettingsObjectDisabledMenuDropDown> = {
|
||||
title: 'Modules/Settings/DataModel/SettingsObjectDisabledMenuDropDown',
|
||||
component: SettingsObjectDisabledMenuDropDown,
|
||||
const meta: Meta<typeof SettingsObjectInactiveMenuDropDown> = {
|
||||
title: 'Modules/Settings/DataModel/SettingsObjectInactiveMenuDropDown',
|
||||
component: SettingsObjectInactiveMenuDropDown,
|
||||
args: {
|
||||
scopeKey: 'settings-object-disabled-menu-dropdown',
|
||||
scopeKey: 'settings-object-inactive-menu-dropdown',
|
||||
onActivate: handleActivateMockFunction,
|
||||
onErase: handleEraseMockFunction,
|
||||
},
|
||||
@ -31,7 +31,7 @@ const meta: Meta<typeof SettingsObjectDisabledMenuDropDown> = {
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof SettingsObjectDisabledMenuDropDown>;
|
||||
type Story = StoryObj<typeof SettingsObjectInactiveMenuDropDown>;
|
||||
|
||||
export const Default: Story = {};
|
||||
|
||||
Reference in New Issue
Block a user