Skip to content

Commit

Permalink
change modalMargin
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfolch-redeemeum committed Apr 2, 2024
1 parent 5f1f91d commit 5b5b34b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@bosonprotocol/react-kit": "^0.29.0-alpha.15",
"@bosonprotocol/react-kit": "^0.29.0-alpha.16",
"@krakenjs/zoid": "^10.3.3",
"@svgr/webpack": "^8.1.0",
"@testing-library/jest-dom": "^5.16.5",
Expand Down
5 changes: 3 additions & 2 deletions src/components/widgets/commitButton/CommitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function CommitButton() {
const ref = useRef<ElementRef<"div">>(null);
const props = window.xprops ?? emptyObject;
const { renderToSelector, buttonStyle, ...commitWidgetProps } = props;
const modalMargin = props.modalMargin || "2%";
const sendDimensions = useCallback(() => {
if (
ref.current &&
Expand Down Expand Up @@ -97,7 +98,7 @@ export function CommitButton() {
ref={ref}
disabled={"disabled" in props && !!props.disabled}
onClick={() => {
CommitWidgetModal(commitWidgetProps).renderTo(
CommitWidgetModal({ ...commitWidgetProps, modalMargin }).renderTo(
window.parent,
renderToSelector || "body",
"iframe"
Expand All @@ -108,7 +109,7 @@ export function CommitButton() {
tagline: true,
onTaglineClick: () => {
PurchaseOverviewModal({
modalMargin: props.modalMargin || "2%"
modalMargin
}).renderTo(
window.parent,
renderToSelector || "body",
Expand Down

0 comments on commit 5b5b34b

Please sign in to comment.