Skip to content

Commit 5274252

Browse files
committed
App Switch in New Tab
1 parent 7ef1eae commit 5274252

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

dist/button.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/test/button.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ui/buttons/props.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,10 @@ type ThrowErrorForInvalidButtonColorArgs = {|
568568
export type ButtonProps = {|
569569
// app switch properties
570570
appSwitchWhenAvailable: boolean,
571+
preferences?: {
572+
appSwitchWhenAvailable?: boolean,
573+
launchAppSwitchIn?: "newTab" | "sameTab",
574+
},
571575
listenForHashChanges: () => void,
572576
removeListenerForHashChanges: () => void,
573577
// Not passed to child iframe

src/zoid/buttons/component.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,13 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
331331
required: false,
332332
},
333333

334+
preferences: {
335+
type: "object",
336+
queryParam: true,
337+
required: false,
338+
serialization: "json",
339+
},
340+
334341
showPayPalAppSwitchOverlay: {
335342
type: "function",
336343
queryParam: false,

0 commit comments

Comments
 (0)