-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into upgrade-to-rn-075
- Loading branch information
Showing
8 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
ts/features/payments/bizEventsTransaction/components/PaymentBizEventsSectionListHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as React from "react"; | ||
import { H2, VSpacer } from "@pagopa/io-app-design-system"; | ||
import { LayoutChangeEvent, View } from "react-native"; | ||
import I18n from "../../../../i18n"; | ||
import { PaymentBizEventsCategoryFilter } from "../types"; | ||
import { PaymentsBizEventsFilterTabs } from "./PaymentsBizEventsFilterTabs"; | ||
|
||
type PaymentBizEventsSectionListHeaderProps = { | ||
onLayout: (event: LayoutChangeEvent) => void; | ||
selectedCategory: PaymentBizEventsCategoryFilter; | ||
onCategorySelected: (category: PaymentBizEventsCategoryFilter) => void; | ||
}; | ||
|
||
export const PaymentBizEventsSectionListHeader = React.memo( | ||
({ | ||
onLayout, | ||
selectedCategory, | ||
onCategorySelected | ||
}: PaymentBizEventsSectionListHeaderProps) => ( | ||
<View onLayout={onLayout}> | ||
<H2 | ||
accessibilityLabel={I18n.t("features.payments.transactions.title")} | ||
accessibilityRole="header" | ||
> | ||
{I18n.t("features.payments.transactions.title")} | ||
</H2> | ||
<VSpacer size={16} /> | ||
<PaymentsBizEventsFilterTabs | ||
selectedCategory={selectedCategory} | ||
onCategorySelected={onCategorySelected} | ||
/> | ||
</View> | ||
), | ||
(prevProps, nextProps) => | ||
prevProps.selectedCategory === nextProps.selectedCategory | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters