diff --git a/packages/gestalt/src/BannerUpsell.tsx b/packages/gestalt/src/BannerUpsell.tsx index cdfee6ab32..8fda59a254 100644 --- a/packages/gestalt/src/BannerUpsell.tsx +++ b/packages/gestalt/src/BannerUpsell.tsx @@ -1,6 +1,7 @@ import { Children, ComponentProps, ReactElement, ReactNode } from 'react'; import classnames from 'classnames'; import styles from './BannerUpsell.css'; +import VRBannerUpsell from './BannerUpsell/VRBannerUpsell'; import BannerUpsellForm from './BannerUpsellForm'; import Box from './Box'; import Button from './Button'; @@ -11,6 +12,7 @@ import IconButton from './IconButton'; import Image from './Image'; import Mask from './Mask'; import Text from './Text'; +import useInExperiment from './useInExperiment'; import useResponsiveMinWidth from './useResponsiveMinWidth'; export type ActionDataType = @@ -148,7 +150,10 @@ export default function BannerUpsell({ const hasActions = Boolean(primaryAction || secondaryAction); const { colorSchemeName } = useColorScheme(); const isDarkMode = colorSchemeName === 'darkMode'; - + const isInVRExperiment = useInExperiment({ + webExperimentName: 'web_gestalt_visualrefresh', + mwebExperimentName: 'web_gestalt_visualrefresh', + }); let messageElement: ReactNode; if (typeof message === 'string') { @@ -177,6 +182,20 @@ export default function BannerUpsell({ ); } + if (isInVRExperiment) { + return ( + + {children} + + ); + } return ( ['onClick']; + rel?: 'none' | 'nofollow'; + role: 'link'; + target?: null | 'self' | 'blank'; + } + | { + accessibilityLabel: string; + disabled?: boolean; + label: string; + onClick: ComponentProps['onClick']; + role?: 'button'; + }; + +type UpsellActionProps = { + data: ActionDataType; + stacked?: boolean; + type: string; + size?: string; +}; + +function UpsellAction({ data, stacked, type, size }: UpsellActionProps) { + const color = type === 'primary' ? 'red' : 'gray'; + const { accessibilityLabel, disabled, label } = data; + + return ( + + {data.role === 'link' ? ( + + ) : ( +