diff --git a/ts/components/ui/IOScrollViewWithLargeHeader.tsx b/ts/components/ui/IOScrollViewWithLargeHeader.tsx index 675fe1a657d..e87deb4f595 100644 --- a/ts/components/ui/IOScrollViewWithLargeHeader.tsx +++ b/ts/components/ui/IOScrollViewWithLargeHeader.tsx @@ -16,6 +16,10 @@ import { } from "../../hooks/useHeaderProps"; import { SupportRequestParams } from "../../hooks/useStartSupportRequest"; import I18n from "../../i18n"; +import { + BodyProps, + ComposedBodyFromArray +} from "../core/typography/ComposedBodyFromArray"; import { IOScrollView } from "./IOScrollView"; export type LargeHeaderTitleProps = { @@ -28,7 +32,7 @@ type Props = { children: React.ReactNode; actions?: ComponentProps["actions"]; title: LargeHeaderTitleProps; - description?: string; + description?: string | Array; goBack?: BackProps["goBack"]; headerActionsProp?: HeaderActionProps; canGoback?: boolean; @@ -111,10 +115,13 @@ export const IOScrollViewWithLargeHeader = forwardRef( {description && ( - {description} + {typeof description === "string" ? ( + {description} + ) : ( + + )} )} - {children} diff --git a/ts/screens/profile/EmailForwardingScreen.tsx b/ts/screens/profile/EmailForwardingScreen.tsx index bd4cb499556..3c0158fcd45 100644 --- a/ts/screens/profile/EmailForwardingScreen.tsx +++ b/ts/screens/profile/EmailForwardingScreen.tsx @@ -13,10 +13,7 @@ import { import _ from "lodash"; import { IOScrollViewWithLargeHeader } from "../../components/ui/IOScrollViewWithLargeHeader"; import I18n from "../../i18n"; -import { - BodyProps, - ComposedBodyFromArray -} from "../../components/core/typography/ComposedBodyFromArray"; +import { BodyProps } from "../../components/core/typography/ComposedBodyFromArray"; import { useIODispatch, useIOSelector } from "../../store/hooks"; import { ProfileState, @@ -158,11 +155,7 @@ const EmailForwardingScreen = () => { return ( - ) as unknown as string - } + description={bodyPropsArray} headerActionsProp={{ showHelp: true }} contextualHelpMarkdown={contextualHelpMarkdown} canGoback={true}