Skip to content

Commit

Permalink
Add issuingProgram setter (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
anojh-stripe authored Oct 21, 2024
1 parent e4f0a58 commit 128ee22
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,13 @@ export const ConnectIssuingCard = ({

export const ConnectIssuingCardsList = ({
showSpendControls,
issuingProgram,
fetchEphemeralKey,
onLoadError,
onLoaderStart,
}: {
showSpendControls?: boolean;
issuingProgram?: string;
fetchEphemeralKey?: FetchEphemeralKeyFunction;
} & CommonComponentProps): JSX.Element => {
const {wrapper, component: issuingCardsList} =
Expand All @@ -372,6 +374,9 @@ export const ConnectIssuingCardsList = ({
useUpdateWithSetter(issuingCardsList, showSpendControls, (comp, val) =>
comp.setShowSpendControls(val)
);
useUpdateWithSetter(issuingCardsList, issuingProgram, (comp, val) =>
comp.setIssuingProgram(val)
);
useUpdateWithSetter(issuingCardsList, fetchEphemeralKey, (comp, val) =>
comp.setFetchEphemeralKey(val)
);
Expand Down Expand Up @@ -453,10 +458,8 @@ export const ConnectRecipients = ({
const {wrapper, component: recipientsComponent} =
useCreateComponent('recipients');

useUpdateWithSetter(
recipientsComponent,
dataSource,
(comp, val) => comp.setDataSource(val)
useUpdateWithSetter(recipientsComponent, dataSource, (comp, val) =>
comp.setDataSource(val)
);
useUpdateWithSetter(recipientsComponent, onLoaderStart, (comp, val) => {
comp.setOnLoaderStart(val);
Expand Down

0 comments on commit 128ee22

Please sign in to comment.