33 *
44 * Maps json-render catalog components to Stripe UI Extension SDK components.
55 */
6- import type { FunctionComponent , ReactNode } from "react" ;
6+ import type { FunctionComponent } from "react" ;
77import type { ComponentRenderProps } from "@json-render/react" ;
88import {
99 Box ,
@@ -50,7 +50,7 @@ import {
5050} from "@stripe/ui-extension-sdk/ui" ;
5151
5252// Helper to format currency
53- const formatCurrency = ( amount : number , currency : string = "usd" ) : string => {
53+ const formatCurrency = ( amount : number , currency = "usd" ) : string => {
5454 return new Intl . NumberFormat ( "en-US" , {
5555 style : "currency" ,
5656 currency : currency . toUpperCase ( ) ,
@@ -500,7 +500,7 @@ export const TextField: FunctionComponent<ExtendedRenderProps> = ({
500500 size = { size as "small" | "medium" | "large" }
501501 disabled = { Boolean ( disabled ) || undefined }
502502 required = { Boolean ( required ) || undefined }
503- onChange = { ( ) => { } }
503+ onChange = { ( ) => undefined }
504504 />
505505 ) ;
506506} ;
@@ -532,7 +532,7 @@ export const TextArea: FunctionComponent<ExtendedRenderProps> = ({
532532 rows = { Number ( rows ) }
533533 disabled = { Boolean ( disabled ) || undefined }
534534 required = { Boolean ( required ) || undefined }
535- onChange = { ( ) => { } }
535+ onChange = { ( ) => undefined }
536536 />
537537 ) ;
538538} ;
@@ -564,7 +564,7 @@ export const Select: FunctionComponent<ExtendedRenderProps> = ({
564564 size = { size as "small" | "medium" | "large" }
565565 disabled = { Boolean ( disabled ) || undefined }
566566 required = { Boolean ( required ) || undefined }
567- onChange = { ( ) => { } }
567+ onChange = { ( ) => undefined }
568568 >
569569 { opts . map ( ( opt : { value : string ; label : string } ) => (
570570 < option key = { opt . value } value = { opt . value } >
@@ -593,7 +593,7 @@ export const Checkbox: FunctionComponent<ExtendedRenderProps> = ({
593593 error = { error ? String ( error ) : undefined }
594594 checked = { checked || undefined }
595595 disabled = { Boolean ( disabled ) || undefined }
596- onChange = { ( ) => { } }
596+ onChange = { ( ) => undefined }
597597 />
598598 ) ;
599599} ;
@@ -615,7 +615,7 @@ export const Radio: FunctionComponent<ExtendedRenderProps> = ({
615615 name = { String ( name || "" ) }
616616 checked = { currentValue === value }
617617 disabled = { Boolean ( disabled ) || undefined }
618- onChange = { ( ) => { } }
618+ onChange = { ( ) => undefined }
619619 />
620620 ) ;
621621} ;
@@ -637,7 +637,7 @@ export const Switch: FunctionComponent<ExtendedRenderProps> = ({
637637 description = { description ? String ( description ) : undefined }
638638 checked = { checked || undefined }
639639 disabled = { Boolean ( disabled ) || undefined }
640- onChange = { ( ) => { } }
640+ onChange = { ( ) => undefined }
641641 />
642642 ) ;
643643} ;
@@ -665,7 +665,7 @@ export const DateField: FunctionComponent<ExtendedRenderProps> = ({
665665 value = { value || "" }
666666 size = { size as "small" | "medium" | "large" }
667667 disabled = { Boolean ( disabled ) || undefined }
668- onChange = { ( ) => { } }
668+ onChange = { ( ) => undefined }
669669 />
670670 ) ;
671671} ;
0 commit comments