Skip to content

Commit

Permalink
feat(payment): INT-2051 added class for dinamic style formating on ch…
Browse files Browse the repository at this point in the history
…eckout page
  • Loading branch information
YosafatSanchez committed Feb 26, 2020
1 parent d416c9f commit 01a6ed8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/payment/paymentMethod/HostedWidgetPaymentMethod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { PaymentFormValues } from '../PaymentForm';
import SignOutLink from './SignOutLink';

export interface HostedWidgetPaymentMethodProps {
additionalContainerClassName?: string;
containerId: string;
hideContentWhenSignedOut?: boolean;
hideVerificationFields?: boolean;
Expand Down Expand Up @@ -142,6 +143,7 @@ class HostedWidgetPaymentMethod extends Component<
method,
isInstrumentFeatureAvailable: isInstrumentFeatureAvailableProp,
isLoadingInstruments,
additionalContainerClassName,
} = this.props;

const {
Expand Down Expand Up @@ -170,7 +172,8 @@ class HostedWidgetPaymentMethod extends Component<
className={ classNames(
'widget',
`widget--${method.id}`,
'payment-widget'
'payment-widget',
additionalContainerClassName
) }
id={ containerId }
style={ {
Expand Down
1 change: 1 addition & 0 deletions src/app/payment/paymentMethod/StripePaymentMethod.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe('when using Stripe payment', () => {
containerId: 'stripe-card-field',
deinitializePayment: expect.any(Function),
initializePayment: expect.any(Function),
additionalContainerClassName: 'optimizedCheckout-form-input',
method,
}));
});
Expand Down
1 change: 1 addition & 0 deletions src/app/payment/paymentMethod/StripePaymentMethod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const StripePaymentMethod: FunctionComponent<SquarePaymentMethodProps> = ({

return <HostedWidgetPaymentMethod
{ ...rest }
additionalContainerClassName="optimizedCheckout-form-input"
containerId="stripe-card-field"
hideContentWhenSignedOut
initializePayment={ initializeStripePayment }
Expand Down

0 comments on commit 01a6ed8

Please sign in to comment.