@@ -15,19 +15,22 @@ import CloudOnly from 'src/shared/components/cloud/CloudOnly'
1515
1616// Utils
1717import { shouldShowUpgradeButton } from 'src/me/selectors'
18+ import { isFlagEnabled } from 'src/shared/utils/featureFlag'
1819
1920interface OwnProps {
20- className ?: string
2121 buttonText ?: string
22- size ?: ComponentSize
22+ className ?: string
2323 metric ?: ( ) => void
24+ showPromoMessage ?: boolean
25+ size ?: ComponentSize
2426}
2527
2628const CloudUpgradeButton : FC < OwnProps > = ( {
27- size = ComponentSize . Small ,
28- className,
2929 buttonText = 'Upgrade Now' ,
30+ className,
3031 metric,
32+ showPromoMessage = true ,
33+ size = ComponentSize . Small ,
3134} ) => {
3235 const showUpgradeButton = useSelector ( shouldShowUpgradeButton )
3336
@@ -44,22 +47,28 @@ const CloudUpgradeButton: FC<OwnProps> = ({
4447 history . push ( '/checkout' )
4548 }
4649
50+ const promoMessage =
51+ isFlagEnabled ( 'credit250Experiment' ) && showPromoMessage ? (
52+ < span className = "credit-250-experiment-upgrade-button--text" >
53+ Get $250 free credit
54+ </ span >
55+ ) : null
56+
4757 return (
4858 < CloudOnly >
4959 { showUpgradeButton && (
50- < Button
51- icon = { IconFont . CrownSolid_New }
52- className = { cloudUpgradeButtonClass }
53- size = { size }
54- shape = { ButtonShape . Default }
55- onClick = { handleClick }
56- text = { buttonText }
57- style = { {
58- background :
59- 'linear-gradient(45deg, rgb(52, 187, 85) 0%, rgb(0, 163, 255) 100%)' ,
60- } }
61- testID = "cloud-upgrade--button"
62- />
60+ < span >
61+ { promoMessage }
62+ < Button
63+ icon = { IconFont . CrownSolid_New }
64+ className = { cloudUpgradeButtonClass }
65+ size = { size }
66+ shape = { ButtonShape . Default }
67+ onClick = { handleClick }
68+ text = { buttonText }
69+ testID = "cloud-upgrade--button"
70+ />
71+ </ span >
6372 ) }
6473 </ CloudOnly >
6574 )
0 commit comments