Skip to content

Commit d2dcf7c

Browse files
committed
refactor: rename quickOptions to presetOptions for consistency across components
1 parent 984c348 commit d2dcf7c

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

packages/thirdweb/src/react/core/hooks/connection/ConnectButtonProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export type FundWalletOptions = {
169169
token: boolean;
170170
chain: boolean;
171171
};
172-
quickOptions?: [number, number, number];
172+
presetOptions?: [number, number, number];
173173
};
174174
};
175175

packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export type UIOptions = Prettify<
4040
mode: "fund_wallet";
4141
destinationToken: Token;
4242
initialAmount?: string;
43-
quickOptions?: [number, number, number];
43+
presetOptions?: [number, number, number];
4444
}
4545
| {
4646
mode: "direct_payment";
@@ -109,7 +109,7 @@ export interface BridgeOrchestratorProps {
109109
/**
110110
* Quick buy amounts
111111
*/
112-
quickOptions?: [number, number, number];
112+
presetOptions?: [number, number, number];
113113
}
114114

115115
export function BridgeOrchestrator({
@@ -123,7 +123,7 @@ export function BridgeOrchestrator({
123123
connectLocale,
124124
purchaseData,
125125
paymentLinkId,
126-
quickOptions,
126+
presetOptions,
127127
}: BridgeOrchestratorProps) {
128128
// Initialize adapters
129129
const adapters = useMemo(
@@ -228,7 +228,7 @@ export function BridgeOrchestrator({
228228
client={client}
229229
onContinue={handleRequirementsResolved}
230230
connectOptions={connectOptions}
231-
quickOptions={quickOptions}
231+
presetOptions={presetOptions}
232232
/>
233233
)}
234234

packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface FundWalletProps {
4848
/**
4949
* Quick buy amounts
5050
*/
51-
quickOptions?: [number, number, number];
51+
presetOptions?: [number, number, number];
5252

5353
/**
5454
* Connect options for wallet connection
@@ -61,7 +61,7 @@ export function FundWallet({
6161
receiverAddress,
6262
uiOptions,
6363
onContinue,
64-
quickOptions = [5, 10, 20],
64+
presetOptions = [5, 10, 20],
6565
connectOptions,
6666
}: FundWalletProps) {
6767
const [amount, setAmount] = useState(uiOptions.initialAmount ?? "");
@@ -228,7 +228,7 @@ export function FundWallet({
228228
</Container>
229229

230230
{/* Quick Amount Buttons */}
231-
{quickOptions && (
231+
{presetOptions && (
232232
<>
233233
<Spacer y="md" />
234234
<Container
@@ -239,7 +239,7 @@ export function FundWallet({
239239
justifyContent: "space-evenly",
240240
}}
241241
>
242-
{quickOptions?.map((amount) => (
242+
{presetOptions?.map((amount) => (
243243
<Button
244244
variant="outline"
245245
onClick={() => handleQuickAmount(Number(amount))}

packages/thirdweb/src/react/web/ui/PayEmbed.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ export function PayEmbed(props: PayEmbedProps) {
480480
onComplete={() => {
481481
props.payOptions?.onPurchaseSuccess?.();
482482
}}
483-
quickOptions={
484-
(props.payOptions as FundWalletOptions)?.prefillBuy?.quickOptions
483+
presetOptions={
484+
(props.payOptions as FundWalletOptions)?.prefillBuy?.presetOptions
485485
}
486486
/>
487487
);

packages/thirdweb/src/stories/Bridge/BridgeOrchestrator.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const meta = {
7272
options: ["light", "dark"],
7373
description: "Theme for the component",
7474
},
75-
quickOptions: {
75+
presetOptions: {
7676
control: "object",
7777
description: "Quick buy options",
7878
},
@@ -187,11 +187,11 @@ export const TransactionLight: Story = {
187187
},
188188
};
189189

190-
export const CustomQuickOptions: Story = {
190+
export const CustompresetOptions: Story = {
191191
args: {
192192
theme: "dark",
193193
uiOptions: FUND_WALLET_UI_OPTIONS.ethDefault,
194-
quickOptions: [1, 2, 3],
194+
presetOptions: [1, 2, 3],
195195
},
196196
parameters: {
197197
backgrounds: { default: "dark" },

0 commit comments

Comments
 (0)