diff --git a/ts/features/design-system/components/DSComponentViewerBox.tsx b/ts/features/design-system/components/DSComponentViewerBox.tsx index 09b955dedf6..d01ac6992e8 100644 --- a/ts/features/design-system/components/DSComponentViewerBox.tsx +++ b/ts/features/design-system/components/DSComponentViewerBox.tsx @@ -6,6 +6,9 @@ const styles = StyleSheet.create({ componentWrapper: { marginBottom: 24 }, + componentWrapperFullWidth: { + flexGrow: 1 + }, lastItem: { marginBottom: 0 }, @@ -26,6 +29,7 @@ const styles = StyleSheet.create({ type DSComponentViewerBoxProps = { name: string; colorMode?: "dark" | "light"; + fullWidth?: boolean; last?: boolean; children: React.ReactNode; }; @@ -34,12 +38,18 @@ export const DSComponentViewerBox = ({ name, colorMode = "light", last = false, + fullWidth = false, children }: DSComponentViewerBoxProps) => { const theme = useIOTheme(); return ( - + {children} {name && ( diff --git a/ts/features/design-system/components/DSLogoPaymentViewerBox.tsx b/ts/features/design-system/components/DSLogoPaymentViewerBox.tsx index 8c4152e6265..e56d4e69406 100644 --- a/ts/features/design-system/components/DSLogoPaymentViewerBox.tsx +++ b/ts/features/design-system/components/DSLogoPaymentViewerBox.tsx @@ -19,12 +19,22 @@ const styles = StyleSheet.create({ logoWrapperLarge: { width: "25%" }, + logoWrapperFull: { + width: "100%" + }, fakeTransparentBg: { position: "absolute", width: "275%", height: "275%", opacity: 0.4 }, + fakeTransparentBgFull: { + position: "absolute", + top: "-25%", + width: "150%", + height: "150%", + opacity: 0.4 + }, nameWrapper: { display: "flex", flexDirection: "row", @@ -45,6 +55,9 @@ const styles = StyleSheet.create({ logoItemLarge: { aspectRatio: 4 / 3 }, + logoItemFull: { + aspectRatio: undefined + }, iconLabel: { fontSize: 10 } @@ -53,7 +66,7 @@ const styles = StyleSheet.create({ type DSLogoPaymentViewerBoxProps = { name: string; image: React.ReactNode; - size: "medium" | "large"; + size: "medium" | "large" | "full"; }; const sizeMap = { @@ -64,6 +77,10 @@ const sizeMap = { large: { wrapper: styles.logoWrapperLarge, item: styles.logoItemLarge + }, + full: { + wrapper: styles.logoWrapperFull, + item: styles.logoItemFull } }; @@ -78,7 +95,11 @@ export const DSLogoPaymentViewerBox = ({ {image} diff --git a/ts/features/design-system/core/DSLogos.tsx b/ts/features/design-system/core/DSLogos.tsx index 638b1f76834..dcda1a339df 100644 --- a/ts/features/design-system/core/DSLogos.tsx +++ b/ts/features/design-system/core/DSLogos.tsx @@ -10,6 +10,11 @@ import { IOPaymentLogos, LogoPayment, LogoPaymentExt, + LogoPaymentCard, + IOPaymentCardLogos, + IOLogoPaymentCardType, + IOColors, + hexToRgba, Avatar, IOVisualCostants } from "@pagopa/io-app-design-system"; @@ -84,6 +89,17 @@ export const DSLogos = () => { Banks (Extended) {renderLogoPaymentExtended()} + + + +

+ Payment Networks (Card) +

+ {renderPaymentLogosCard()} ); }; @@ -244,17 +260,45 @@ const renderLogoPaymentExtended = () => ( dimensions={{ height: 33, width: 150 }} /> - - - - - +); + +const renderPaymentLogosCard = () => ( + + {Object.entries(IOPaymentCardLogos).map(([logoItemName]) => ( + + } /> + ))} + + + + + + + + + - + );