Skip to content

Commit

Permalink
feat: add cardfields form component
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianfdz committed Apr 18, 2024
1 parent ba64add commit 634e6cd
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/components/cardFields/PayPalCardFieldsForm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react";

import { PayPalCardFieldsFormOptions } from "../../types";
import { PayPalCardField } from "./PayPalCardField";
import { FlexContainer } from "../ui/FlexContainer";

export const PayPalCardFieldsForm: React.FC<PayPalCardFieldsFormOptions> = ({
className,
...options
}) => {
return (
<>
<style
dangerouslySetInnerHTML={{
__html: `.w-full { width:100%; }`,
}}
/>
<div className={className}>
<PayPalCardField fieldName="NameField" {...options} />
<PayPalCardField fieldName="NumberField" {...options} />
<FlexContainer>
<PayPalCardField
fieldName="ExpiryField"
className="w-full"
{...options}
/>
<PayPalCardField
fieldName="CVVField"
className="w-full"
{...options}
/>
</FlexContainer>
</div>
</>
);
};

0 comments on commit 634e6cd

Please sign in to comment.