Skip to content

Commit f13b893

Browse files
committed
fix: popup position
1 parent 08a33c1 commit f13b893

File tree

1 file changed

+69
-63
lines changed

1 file changed

+69
-63
lines changed

src/components/FeedbackWidget.tsx

Lines changed: 69 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -185,79 +185,85 @@ const FeedbackWidget = () => {
185185
<AlertDialogOverlay>
186186
<AlertDialogContent
187187
position="fixed"
188-
insetEnd={{ base: 4, sm: 8 }}
189-
insetStart={{ base: 4, sm: "auto" }}
190-
bottom={{ base: `${bottomOffset + 5}rem`, lg: 20 }}
191-
w={{ base: "auto", sm: "300px" }}
192-
bgColor="ednBackground"
193-
border="1px"
194-
borderColor="buttonColor"
188+
maxW={1504}
189+
m="auto"
190+
alignItems="flex-end"
191+
backgroundColor="transparent"
195192
boxShadow="tableItemBox"
196-
borderRadius="base"
197-
py="4"
198-
px="2"
193+
me={24}
194+
bottom={{ base: `${bottomOffset + 5}rem`, lg: 20 }}
199195
>
200-
<AlertDialogCloseButton />
201-
202-
<AlertDialogHeader
203-
fontSize="xl"
204-
fontWeight="bold"
205-
lineHeight="6"
206-
textAlign="center"
196+
<Box
197+
w={{ base: "auto", sm: "300px" }}
198+
bgColor="ednBackground"
199+
border="1px"
200+
borderColor="buttonColor"
201+
borderRadius="base"
202+
py="4"
203+
px="2"
207204
>
208-
{feedbackSubmitted
209-
? t("feedback-widget-thank-you-title")
210-
: t("feedback-widget-prompt")}
211-
</AlertDialogHeader>
205+
<AlertDialogCloseButton />
212206

213-
{/* Body: */}
214-
{feedbackSubmitted && (
215-
<>
216-
<AlertDialogBody
217-
fontWeight="normal"
218-
fontSize="md"
219-
lineHeight="5"
220-
textAlign="center"
221-
>
222-
{t("feedback-widget-thank-you-subtitle")}
223-
</AlertDialogBody>
224-
<AlertDialogBody
225-
fontWeight="bold"
226-
fontSize="xs"
227-
lineHeight="4"
228-
letterSpacing="wide"
229-
color="searchBorder"
230-
textAlign="center"
231-
>
232-
{t("feedback-widget-thank-you-timing")}
233-
</AlertDialogBody>
234-
</>
235-
)}
207+
<AlertDialogHeader
208+
fontSize="xl"
209+
fontWeight="bold"
210+
lineHeight="6"
211+
textAlign="center"
212+
>
213+
{feedbackSubmitted
214+
? t("feedback-widget-thank-you-title")
215+
: t("feedback-widget-prompt")}
216+
</AlertDialogHeader>
236217

237-
<AlertDialogFooter display="flex" gap="6">
238-
{feedbackSubmitted ? (
239-
<Button onClick={handleSurveyOpen} flex={1}>
240-
{t("feedback-widget-thank-you-cta")}
241-
</Button>
242-
) : (
218+
{/* Body: */}
219+
{feedbackSubmitted && (
243220
<>
244-
<Button
245-
variant="solid"
246-
onClick={() => handleSubmit(true)}
247-
flex={1}
221+
<AlertDialogBody
222+
fontWeight="normal"
223+
fontSize="md"
224+
lineHeight="5"
225+
textAlign="center"
248226
>
249-
{t("yes")}
250-
</Button>
251-
<Button
252-
variant="solid"
253-
onClick={() => handleSubmit(false)}
254-
flex={1}
227+
{t("feedback-widget-thank-you-subtitle")}
228+
</AlertDialogBody>
229+
<AlertDialogBody
230+
fontWeight="bold"
231+
fontSize="xs"
232+
lineHeight="4"
233+
letterSpacing="wide"
234+
color="searchBorder"
235+
textAlign="center"
255236
>
256-
{t("no")}
257-
</Button>
237+
{t("feedback-widget-thank-you-timing")}
238+
</AlertDialogBody>
258239
</>
259240
)}
260-
</AlertDialogFooter>
241+
242+
<AlertDialogFooter display="flex" gap="6">
243+
{feedbackSubmitted ? (
244+
<Button onClick={handleSurveyOpen} flex={1}>
245+
{t("feedback-widget-thank-you-cta")}
246+
</Button>
247+
) : (
248+
<>
249+
<Button
250+
variant="solid"
251+
onClick={() => handleSubmit(true)}
252+
flex={1}
253+
>
254+
{t("yes")}
255+
</Button>
256+
<Button
257+
variant="solid"
258+
onClick={() => handleSubmit(false)}
259+
flex={1}
260+
>
261+
{t("no")}
262+
</Button>
263+
</>
264+
)}
265+
</AlertDialogFooter>
266+
</Box>
261267
</AlertDialogContent>
262268
</AlertDialogOverlay>
263269
</AlertDialog>

0 commit comments

Comments
 (0)