diff --git a/src-ts/lib/button/Button.tsx b/src-ts/lib/button/Button.tsx index 35594f5dd..0c66d6958 100644 --- a/src-ts/lib/button/Button.tsx +++ b/src-ts/lib/button/Button.tsx @@ -6,7 +6,7 @@ import '../styles/index.scss' import { IconOutline } from '../svgs' export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' -export type ButtonStyle = 'icon' | 'link' | 'primary' | 'secondary' | 'tertiary' | 'text' +export type ButtonStyle = 'icon' | 'icon-bordered' | 'link' | 'primary' | 'secondary' | 'tertiary' | 'text' export type ButtonType = 'button' | 'submit' export interface ButtonProps { diff --git a/src-ts/lib/payment-form/PaymentForm.module.scss b/src-ts/lib/payment-form/PaymentForm.module.scss index bcaea22f9..0b3dcf4c4 100644 --- a/src-ts/lib/payment-form/PaymentForm.module.scss +++ b/src-ts/lib/payment-form/PaymentForm.module.scss @@ -60,4 +60,10 @@ .pay-button { width: 100%; } + + .error { + @extend .body-small; + color: $red-120; + margin-bottom: $pad-lg; + } } \ No newline at end of file diff --git a/src-ts/lib/payment-form/PaymentForm.tsx b/src-ts/lib/payment-form/PaymentForm.tsx index 404c172fc..840852e59 100644 --- a/src-ts/lib/payment-form/PaymentForm.tsx +++ b/src-ts/lib/payment-form/PaymentForm.tsx @@ -31,8 +31,10 @@ interface FieldDirtyState { } interface PaymentFormProps { + error: boolean formData: PaymentFormData isFormValid: boolean + onPay: () => void onUpdateField: (fieldName: string, value: string | boolean) => void } @@ -175,7 +177,7 @@ const PaymentForm: React.FC = (props: PaymentFormProps) => { value={props.formData.name} /> - + props.onUpdateField('country', option)} @@ -206,6 +208,14 @@ const PaymentForm: React.FC = (props: PaymentFormProps) => { A hold will be placed on your card for the full amount of the project. Once your work is live on the Topcoder platform, you will be charged. + { + props.error && ( +
+ Your card was declined. Please try a different card. +
+ ) + } +