Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/social-showers-see.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix Embed container size
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function BuyAndSwapEmbed(props: {
}, [props.pageType]);

return (
<div className="bg-card rounded-2xl border overflow-hidden flex flex-col relative z-10 shadow-xl">
<div className="bg-card rounded-2xl border overflow-hidden flex flex-col relative z-10 shadow-xl min-w-0">
<div className="flex gap-2.5 p-4 border-b border-dashed">
<TabButton
label="Swap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function GridPatternEmbedContainer(props: {
children: React.ReactNode;
}) {
return (
<div className="sm:flex sm:justify-center w-full sm:border sm:border-dashed sm:bg-accent/20 sm:py-12 rounded-xl overflow-hidden relative">
<div className="flex justify-center w-full sm:border sm:border-dashed sm:bg-accent/20 sm:py-12 sm:rounded-xl sm:overflow-hidden relative">
<GridPattern
width={30}
height={30}
Expand All @@ -17,7 +17,7 @@ export function GridPatternEmbedContainer(props: {
"linear-gradient(to bottom right,white,transparent,transparent)",
}}
/>
<div className="z-10">{props.children}</div>
<div className="z-10 min-w-0">{props.children}</div>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ export function UniversalBridgeEmbed({
const chain = useV5DashboardChain(chainId || 1);

return (
<div className="w-full lg:w-[400px]">
<BuyAndSwapEmbed
chain={chain}
buyAmount={amount}
tokenAddress={token?.address}
pageType="bridge"
/>
</div>
<BuyAndSwapEmbed
chain={chain}
buyAmount={amount}
tokenAddress={token?.address}
pageType="bridge"
/>
);
}
2 changes: 1 addition & 1 deletion apps/dashboard/src/app/bridge/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default async function BridgePage({
<div className="grow flex flex-col relative overflow-hidden">
<PageHeader />

<div className="flex grow flex-col items-center justify-center py-36 px-4 min-h-dvh relative overflow-hidden">
<div className="flex grow items-center justify-center py-36 px-4 min-h-dvh relative overflow-hidden">
<DotsBackgroundPattern />
<UniversalBridgeEmbed
amount={amount as string}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,7 @@
lineHeight: "normal",
overflow: "hidden",
position: "relative",
width: "100vw",
maxWidth:
modalSize === "compact" ? modalMaxWidthCompact : modalMaxWidthWide,
maxWidth: "100%",
width: modalSize === "compact" ? modalMaxWidthCompact : modalMaxWidthWide,

Check warning on line 483 in packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx#L482-L483

Added lines #L482 - L483 were not covered by tests
};
});
3 changes: 0 additions & 3 deletions packages/thirdweb/src/stories/ConnectEmbed.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import { storyClient } from "./utils.js";

const meta: Meta<typeof ConnectEmbed> = {
title: "Connect/ConnectEmbed",
parameters: {
layout: "centered",
},
decorators: [
(Story) => {
return (
Expand Down
Loading