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:
selango1
2024-03-04 08:59:31 -05:00
committed by GitHub
parent 3c63584ef8
commit 38a0aae030
8 changed files with 46 additions and 46 deletions

View File

@ -19,7 +19,7 @@ type SettingsAboutSectionProps = {
iconKey?: string;
isCustom: boolean;
name: string;
onDisable: () => void;
onDeactivate: () => void;
onEdit: () => void;
};
@ -49,7 +49,7 @@ export const SettingsAboutSection = ({
iconKey = '',
isCustom,
name,
onDisable,
onDeactivate,
onEdit,
}: SettingsAboutSectionProps) => {
const theme = useTheme();
@ -63,8 +63,8 @@ export const SettingsAboutSection = ({
closeDropdown();
};
const handleDisable = () => {
onDisable();
const handleDeactivate = () => {
onDeactivate();
closeDropdown();
};
@ -92,9 +92,9 @@ export const SettingsAboutSection = ({
onClick={handleEdit}
/>
<MenuItem
text="Disable"
text="Deactivate"
LeftIcon={IconArchive}
onClick={handleDisable}
onClick={handleDeactivate}
/>
</DropdownMenuItemsContainer>
</DropdownMenu>

View File

@ -14,7 +14,7 @@ import { MenuItem } from '@/ui/navigation/menu-item/components/MenuItem';
type SettingsObjectFieldActiveActionDropdownProps = {
isCustomField?: boolean;
onDisable?: () => void;
onDeactivate?: () => void;
onEdit: () => void;
onSetAsLabelIdentifier?: () => void;
scopeKey: string;
@ -22,7 +22,7 @@ type SettingsObjectFieldActiveActionDropdownProps = {
export const SettingsObjectFieldActiveActionDropdown = ({
isCustomField,
onDisable,
onDeactivate,
onEdit,
onSetAsLabelIdentifier,
scopeKey,
@ -36,8 +36,8 @@ export const SettingsObjectFieldActiveActionDropdown = ({
closeDropdown();
};
const handleDisable = () => {
onDisable?.();
const handleDeactivate = () => {
onDeactivate?.();
closeDropdown();
};
@ -67,11 +67,11 @@ export const SettingsObjectFieldActiveActionDropdown = ({
onClick={handleSetAsLabelIdentifier}
/>
)}
{!!onDisable && (
{!!onDeactivate && (
<MenuItem
text="Disable"
text="Deactivate"
LeftIcon={IconArchive}
onClick={handleDisable}
onClick={handleDeactivate}
/>
)}
</DropdownMenuItemsContainer>

View File

@ -6,17 +6,17 @@ 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 SettingsObjectFieldDisabledActionDropdownProps = {
type SettingsObjectFieldInactiveActionDropdownProps = {
isCustomField?: boolean;
onActivate: () => void;
onErase: () => void;
scopeKey: string;
};
export const SettingsObjectFieldDisabledActionDropdown = ({
export const SettingsObjectFieldInactiveActionDropdown = ({
onActivate,
scopeKey,
}: SettingsObjectFieldDisabledActionDropdownProps) => {
}: SettingsObjectFieldInactiveActionDropdownProps) => {
const dropdownId = `${scopeKey}-settings-field-disabled-action-dropdown`;
const { closeDropdown } = useDropdown(dropdownId);