Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: modals were not responsive (#634)

bautistaaace18b3981bbf
diff --git a/apps/web/src/app/[locale]/challenge/_components/description/index.tsx b/apps/web/src/app/[locale]/challenge/_components/description/index.tsx
index 8ee9d31f..b5336349 100644
--- a/apps/web/src/app/[locale]/challenge/_components/description/index.tsx
+++ b/apps/web/src/app/[locale]/challenge/_components/description/index.tsx
@@ -96,7 +96,7 @@ export function Description({ challenge }: Props) {
</TooltipContent>
</Tooltip>
</DialogTrigger>
- <DialogContent className="w-[200px]">
+ <DialogContent>
<DialogHeader>
<DialogTitle>Share this challenge</DialogTitle>
</DialogHeader>
diff --git a/apps/web/src/app/[locale]/challenge/_components/editor-shortcuts/editor-shortcuts-button.tsx b/apps/web/src/app/[locale]/challenge/_components/editor-shortcuts/editor-shortcuts-button.tsx
index 7d2730e6..5fe1f835 100644
--- a/apps/web/src/app/[locale]/challenge/_components/editor-shortcuts/editor-shortcuts-button.tsx
+++ b/apps/web/src/app/[locale]/challenge/_components/editor-shortcuts/editor-shortcuts-button.tsx
@@ -20,7 +20,7 @@ export function EditorShortcutsButton() {
<TooltipContent className="px-2 py-1">Shortcuts</TooltipContent>
</Tooltip>
</DialogTrigger>
- <DialogContent className="w-[200px]">
+ <DialogContent>
<DialogHeader>
<DialogTitle>Shortcuts</DialogTitle>
</DialogHeader>
diff --git a/apps/web/src/app/[locale]/challenge/_components/settings/settings-button.tsx b/apps/web/src/app/[locale]/challenge/_components/settings/settings-button.tsx
index 139814e0..1396d2c1 100644
--- a/apps/web/src/app/[locale]/challenge/_components/settings/settings-button.tsx
+++ b/apps/web/src/app/[locale]/challenge/_components/settings/settings-button.tsx
@@ -20,13 +20,11 @@ export function SettingsButton() {
<TooltipContent className="px-2 py-1">Settings</TooltipContent>
</Tooltip>
</DialogTrigger>
- <DialogContent className="w-[200px]">
+ <DialogContent>
<DialogHeader>
<DialogTitle>Settings</DialogTitle>
</DialogHeader>
- <div className="pt-4">
- <SettingsForm />
- </div>
+ <SettingsForm />
</DialogContent>
</Dialog>
);
diff --git a/apps/web/src/app/[locale]/challenge/_components/share-form.tsx b/apps/web/src/app/[locale]/challenge/_components/share-form.tsx
index 001dd489..dcabbf60 100644
--- a/apps/web/src/app/[locale]/challenge/_components/share-form.tsx
+++ b/apps/web/src/app/[locale]/challenge/_components/share-form.tsx
@@ -51,30 +51,32 @@ export function ShareForm() {
<code className="rounded-md border px-4 py-2 dark:border-gray-300">{url}</code>
<DialogFooter>
- <button
- className={`flex items-center justify-between space-x-2 rounded-lg px-2 py-1 duration-300 active:scale-75
+ <div className="flex justify-end gap-2">
+ <button
+ className={`flex items-center justify-between space-x-2 rounded-lg px-2 py-1 duration-300 active:scale-75
${
copiedWithCode
? 'border border-green-500 text-green-500 dark:border-green-700 dark:bg-green-700 dark:text-white'
: 'border border-gray-100 text-black hover:bg-gray-100 dark:bg-white'
}`}
- onClick={copyToClipboardWithCode}
- >
- <span>{copiedWithCode ? 'Copied!' : 'Share with Code'}</span>
- {copiedWithCode ? <CheckCircle2Icon /> : <ClipboardIcon />}
- </button>
- <button
- className={`flex items-center justify-between space-x-2 rounded-lg px-2 py-1 duration-300 active:scale-75
+ onClick={copyToClipboardWithCode}
+ >
+ <span>{copiedWithCode ? 'Copied!' : 'Share with Code'}</span>
+ {copiedWithCode ? <CheckCircle2Icon /> : <ClipboardIcon />}
+ </button>
+ <button
+ className={`flex items-center justify-between space-x-2 rounded-lg px-2 py-1 duration-300 active:scale-75
${
copied
? 'border border-green-500 text-green-500 dark:border-green-700 dark:bg-green-700 dark:text-white'
: 'border border-gray-100 text-black hover:bg-gray-100 dark:bg-white'
}`}
- onClick={copyToClipboard}
- >
- <span>{copied ? 'Copied!' : 'Copy'}</span>
- {copied ? <CheckCircle2Icon /> : <ClipboardIcon />}
- </button>
+ onClick={copyToClipboard}
+ >
+ <span>{copied ? 'Copied!' : 'Copy'}</span>
+ {copied ? <CheckCircle2Icon /> : <ClipboardIcon />}
+ </button>
+ </div>
</DialogFooter>
</div>
);
diff --git a/turbo.json b/turbo.json
index a8ad5af2..3a4993a9 100644
--- a/turbo.json
+++ b/turbo.json
@@ -1,4 +1,5 @@
-{"experimentalSpaces":{"id":"space_CWwpUyi1jEpIayj8iSDdz2Ze"},
+{
+ "experimentalSpaces": { "id": "space_CWwpUyi1jEpIayj8iSDdz2Ze" },
"pipeline": {
"build": {
"dependsOn": ["^build", "@repo/db#db:generate"],