Skip to content

Commit

Permalink
Remove DSLegacyButtons and BlockButtons references
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnplb committed Nov 29, 2024
1 parent 873fde1 commit d4a2533
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 156 deletions.
112 changes: 0 additions & 112 deletions ts/features/design-system/core/DSLegacyButtons.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions ts/features/design-system/navigation/navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ import { DSIcons } from "../core/DSIcons";
import { DSIridescentTrustmark } from "../core/DSIridescentTrustmark";
import { DSLayout } from "../core/DSLayout";
import { DSLegacyAdvice } from "../core/DSLegacyAdvice";
import { DSLegacyButtons } from "../core/DSLegacyButtons";
import { DSLegacyListItems } from "../core/DSLegacyListItems";
import { DSLegacyTextFields } from "../core/DSLegacyTextFields";
import { DSListItems } from "../core/DSListItems";
Expand Down Expand Up @@ -584,14 +583,6 @@ export const DesignSystemNavigator = () => {

{/* LEGACY */}

<Stack.Screen
name={DESIGN_SYSTEM_ROUTES.LEGACY.BUTTONS.route}
component={DSLegacyButtons}
options={{
headerTitle: DESIGN_SYSTEM_ROUTES.LEGACY.BUTTONS.title
}}
/>

<Stack.Screen
name={DESIGN_SYSTEM_ROUTES.LEGACY.TEXT_FIELDS.route}
component={DSLegacyTextFields}
Expand Down
1 change: 0 additions & 1 deletion ts/features/design-system/navigation/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export type DesignSystemParamsList = {
[DESIGN_SYSTEM_ROUTES.EXPERIMENTAL_LAB.ANIMATED_PICTOGRAMS.route]: undefined;
[DESIGN_SYSTEM_ROUTES.EXPERIMENTAL_LAB.DYNAMIC_BACKGROUND.route]: undefined;
[DESIGN_SYSTEM_ROUTES.EXPERIMENTAL_LAB.IRIDESCENT_TRUSTMARK.route]: undefined;
[DESIGN_SYSTEM_ROUTES.LEGACY.BUTTONS.route]: undefined;
[DESIGN_SYSTEM_ROUTES.LEGACY.TEXT_FIELDS.route]: undefined;
[DESIGN_SYSTEM_ROUTES.LEGACY.LIST_ITEMS.route]: undefined;
[DESIGN_SYSTEM_ROUTES.LEGACY.ADVICE.route]: undefined;
Expand Down
4 changes: 0 additions & 4 deletions ts/features/design-system/navigation/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ const DESIGN_SYSTEM_ROUTES = {
}
},
LEGACY: {
BUTTONS: {
route: "DESIGN_SYSTEM_LEGACY_BUTTONS",
title: "Buttons"
},
TEXT_FIELDS: {
route: "DESIGN_SYSTEM_LEGACY_TEXT_FIELDS",
title: "Text Fields"
Expand Down
51 changes: 21 additions & 30 deletions ts/features/fci/hooks/useFciAbortSignatureFlow.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import * as React from "react";
import { Alert, View } from "react-native";
import { useRoute } from "@react-navigation/native";
import {
BlockButtons,
ButtonSolidProps,
IOVisualCostants,
FooterActionsInline,
useIOExperimentalDesign
} from "@pagopa/io-app-design-system";
import { useRoute } from "@react-navigation/native";
import * as React from "react";
import { Alert } from "react-native";
import LegacyMarkdown from "../../../components/ui/Markdown/LegacyMarkdown";
import I18n from "../../../i18n";
import { fciEndRequest } from "../store/actions";
import { useIODispatch, useIOSelector } from "../../../store/hooks";
import { trackFciUserExit } from "../analytics";
import { fciSignatureRequestDossierTitleSelector } from "../store/reducers/fciSignatureRequest";
import LegacyMarkdown from "../../../components/ui/Markdown/LegacyMarkdown";
import { useIOBottomSheetModal } from "../../../utils/hooks/bottomSheet";
import { trackFciUserExit } from "../analytics";
import { fciEndRequest } from "../store/actions";
import { fciEnvironmentSelector } from "../store/reducers/fciEnvironment";
import { fciSignatureRequestDossierTitleSelector } from "../store/reducers/fciSignatureRequest";

/**
* A hook that returns a function to present the abort signature flow bottom sheet
Expand All @@ -35,19 +33,6 @@ export const useFciAbortSignatureFlow = () => {
dismiss();
};

const cancelButtonProps: ButtonSolidProps = {
testID: "FciStopAbortingSignatureTestID",
onPress: () => dismiss(),
label: I18n.t("features.fci.abort.confirm"),
accessibilityLabel: I18n.t("features.fci.abort.confirm")
};
const continueButtonProps: ButtonSolidProps = {
onPress: () => abortSignatureFlow(),
color: "danger",
label: I18n.t("features.fci.abort.cancel"),
accessibilityLabel: I18n.t("features.fci.abort.cancel")
};

const {
present: presentBs,
bottomSheet,
Expand All @@ -61,13 +46,19 @@ export const useFciAbortSignatureFlow = () => {
),
snapPoint: [280],
footer: (
<View style={{ paddingHorizontal: IOVisualCostants.appMarginDefault }}>
<BlockButtons
type={"TwoButtonsInlineHalf"}
primary={{ type: "Outline", buttonProps: cancelButtonProps }}
secondary={{ type: "Solid", buttonProps: continueButtonProps }}
/>
</View>
<FooterActionsInline
startAction={{
color: "primary",
label: I18n.t("features.fci.abort.confirm"),
onPress: () => dismiss(),
testID: "FciStopAbortingSignatureTestID"
}}
endAction={{
color: "danger",
label: I18n.t("features.fci.abort.cancel"),
onPress: () => abortSignatureFlow()
}}
/>
)
});

Expand Down

0 comments on commit d4a2533

Please sign in to comment.