From e6422b1944380d0d141ad604abfde37c00821663 Mon Sep 17 00:00:00 2001 From: "Napas (Tian) Udomsak" <14320466+tian000@users.noreply.github.com> Date: Tue, 19 Nov 2024 07:04:53 -0800 Subject: [PATCH] chore: Add padding config (#16) * add padding config * changeset * fix typo --------- Co-authored-by: Nick Cruz --- .changeset/rude-parrots-return.md | 5 +++++ packages/sdk/src/index.ts | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 .changeset/rude-parrots-return.md diff --git a/.changeset/rude-parrots-return.md b/.changeset/rude-parrots-return.md new file mode 100644 index 0000000..0f0277f --- /dev/null +++ b/.changeset/rude-parrots-return.md @@ -0,0 +1,5 @@ +--- +"@phantom/wallet-sdk": patch +--- + +Add paddingBottom and paddingRight configuration options diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index e334848..da96e87 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -4,6 +4,8 @@ export type CreatePhantomConfig = Partial<{ zIndex: number; hideLauncherBeforeOnboarded: boolean; colorScheme: string; + paddingBottom: number; + paddingRight: number; }>; export function createPhantom(config: CreatePhantomConfig = {}) { @@ -20,6 +22,13 @@ export function createPhantom(config: CreatePhantomConfig = {}) { ); if (config.colorScheme) sdkURL.searchParams.append("colorScheme", config.colorScheme.toString()); + if (config.paddingBottom) + sdkURL.searchParams.append( + "paddingBottom", + config.paddingBottom.toString(), + ); + if (config.paddingRight) + sdkURL.searchParams.append("paddingRight", config.paddingRight.toString()); scriptTag.setAttribute("type", "module"); scriptTag.setAttribute("src", sdkURL.toString());