Skip to content

Commit e6422b1

Browse files
tian000nickcruz
andauthored
chore: Add padding config (#16)
* add padding config * changeset * fix typo --------- Co-authored-by: Nick Cruz <[email protected]>
1 parent dee7640 commit e6422b1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.changeset/rude-parrots-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@phantom/wallet-sdk": patch
3+
---
4+
5+
Add paddingBottom and paddingRight configuration options

packages/sdk/src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export type CreatePhantomConfig = Partial<{
44
zIndex: number;
55
hideLauncherBeforeOnboarded: boolean;
66
colorScheme: string;
7+
paddingBottom: number;
8+
paddingRight: number;
79
}>;
810

911
export function createPhantom(config: CreatePhantomConfig = {}) {
@@ -20,6 +22,13 @@ export function createPhantom(config: CreatePhantomConfig = {}) {
2022
);
2123
if (config.colorScheme)
2224
sdkURL.searchParams.append("colorScheme", config.colorScheme.toString());
25+
if (config.paddingBottom)
26+
sdkURL.searchParams.append(
27+
"paddingBottom",
28+
config.paddingBottom.toString(),
29+
);
30+
if (config.paddingRight)
31+
sdkURL.searchParams.append("paddingRight", config.paddingRight.toString());
2332

2433
scriptTag.setAttribute("type", "module");
2534
scriptTag.setAttribute("src", sdkURL.toString());

0 commit comments

Comments
 (0)