Skip to content

Commit

Permalink
openIn=window -> popup
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAlec committed Aug 14, 2024
1 parent a9c6a57 commit f162d4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions site/docs/pages/wallet/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ export type WalletDropdownFundLinkReact = {
href: string;
icon?: ReactNode;
rel?: string;
openIn?: 'window' | 'tab'; // Whether to open the funding flow in a tab or a window
openIn?: 'popup' | 'tab'; // Whether to open the funding flow in a tab or a popup window
target?: string; // Where to open the target if `openIn` is set to tab
text?: string; // Optional text override
popupSize?: 'sm' | 'md' | 'lg'; // Size of the popup window if `openIn` is set to window
popupSize?: 'sm' | 'md' | 'lg'; // Size of the popup window if `openIn` is set to `popup`
};
```

Expand Down
4 changes: 2 additions & 2 deletions src/wallet/components/WalletDropdownFundLink.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('WalletDropdownFundLink', () => {
// Mock window.screen
vi.stubGlobal('screen', { width: 1024, height: 768 });

render(<WalletDropdownFundLink openIn="window" />);
render(<WalletDropdownFundLink openIn="popup" />);

const linkElement = screen.getByText('Fund wallet');
fireEvent.click(linkElement);
Expand Down Expand Up @@ -84,7 +84,7 @@ describe('WalletDropdownFundLink', () => {

render(
<WalletDropdownFundLink
openIn="window"
openIn="popup"
popupSize={size as keyof typeof testCases}
/>,
);
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ export type WalletDropdownFundLinkReact = {
href: string;
icon?: ReactNode;
rel?: string;
openIn?: 'window' | 'tab'; // Whether to open the funding flow in a tab or a window
openIn?: 'popup' | 'tab'; // Whether to open the funding flow in a tab or a popup window
target?: string; // Where to open the target if `openIn` is set to tab
text?: string; // Optional text override
popupSize?: 'sm' | 'md' | 'lg'; // Size of the popup window if `openIn` is set to window
popupSize?: 'sm' | 'md' | 'lg'; // Size of the popup window if `openIn` is set to `popup`
};

/**
Expand Down

0 comments on commit f162d4b

Please sign in to comment.