order details: fix style

This commit is contained in:
2025-11-05 21:34:04 +03:00
parent b2354c5c49
commit 1564d810a3
2 changed files with 76 additions and 24 deletions

View File

@@ -1,9 +1,65 @@
.container {
padding: 16px;
position: relative;
display: grid;
grid-template-rows: auto minmax(0, auto) auto minmax(0, auto) auto minmax(
0,
auto
) auto;
gap: 4px;
height: 100%;
max-height: 100%;
overflow-y: auto;
}
.saveButton { .saveButton {
border-radius: 100px; border-radius: 100px;
height: 48px; height: 48px;
width: 100%; width: 100%;
font-size: 16px; font-size: 16px;
box-shadow: none; box-shadow: none;
position: fixed; margin-top: 16px;
bottom: 0;left: 0; }
.noLocationContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 12px;
text-align: center;
min-height: 80px;
max-height: 120px;
}
.smallTextStyle {
font-size: 12px;
margin-top: 4px;
}
.mapContainer {
width: 100%;
border-radius: 8px;
overflow: hidden;
height: auto;
max-height: 160px;
}
.sectionTitle {
font-weight: 600;
font-size: 16px;
margin-bottom: 8px;
}
.sectionContent {
width: 100%;
min-height: 0;
display: flex;
flex-direction: column;
border-radius: 6px;
background-color: var(--border);
}
.segmentedContent {
width: 100%;
margin-bottom: 15px;
} }

View File

@@ -3,7 +3,6 @@ import { ProBottomSheet } from "components/ProBottomSheet/ProBottomSheet.tsx";
import { useAppSelector } from "redux/hooks.ts"; import { useAppSelector } from "redux/hooks.ts";
import ProText from "components/ProText.tsx"; import ProText from "components/ProText.tsx";
import { OrderType } from "pages/checkout/hooks/types.ts"; import { OrderType } from "pages/checkout/hooks/types.ts";
import ProInputCard from "components/ProInputCard/ProInputCard.tsx";
import { Segmented, Button } from "antd"; import { Segmented, Button } from "antd";
import DineInIcon from "./icons/dineIn.svg?react"; import DineInIcon from "./icons/dineIn.svg?react";
@@ -29,16 +28,16 @@ export function OrderDetailsBottomSheet({
isOpen={isOpen} isOpen={isOpen}
onClose={onClose} onClose={onClose}
title={t("orderDetails.title")} title={t("orderDetails.title")}
height={500} height="70vh"
snapPoints={["60vh"]} snapPoints={["70vh"]}
showCloseButton={false} showCloseButton={false}
> >
<div style={{ padding: "16px 0", position: "relative" }}> <div className={styles.container}>
{/* Order Type */} {/* Order Type */}
<ProInputCard <div className={styles.sectionTitle}>
title={t("orderDetails.fulfillmentType")} {t("orderDetails.fulfillmentType")}
dividerStyle={{ margin: "5px 0 0 0" }} </div>
> <div className={styles.segmentedContent}>
<Segmented <Segmented
options={[ options={[
{ {
@@ -59,18 +58,16 @@ export function OrderDetailsBottomSheet({
]} ]}
value={orderType} value={orderType}
size="small" size="small"
block
/> />
</ProInputCard> </div>
<ProInputCard <div className={styles.sectionTitle}>{t("orderDetails.location")}</div>
title={t("orderDetails.location")} <div className={styles.sectionContent}>
dividerStyle={{ margin: "5px 0 0 0" }}
>
{!location ? ( {!location ? (
<div className={styles.noLocationContainer}> <div className={styles.noLocationContainer}>
<ProText type="secondary"> <ProText type="secondary">
{t("address.noLocationSelected")} {t("address.noLocationSelected")}
</ProText> </ProText>
<br />
<ProText type="secondary" className={styles.smallTextStyle}> <ProText type="secondary" className={styles.smallTextStyle}>
{t("address.clickEditToSelect")} {t("address.clickEditToSelect")}
</ProText> </ProText>
@@ -80,25 +77,24 @@ export function OrderDetailsBottomSheet({
<GoogleMap <GoogleMap
readOnly={true} readOnly={true}
initialLocation={location} initialLocation={location}
height="160px" height="100%"
/> />
</div> </div>
)} )}
</ProInputCard> </div>
<ProInputCard <div className={styles.sectionTitle}>
title={t("orderDetails.pickupTime")} {t("orderDetails.pickupTime")}
dividerStyle={{ margin: "5px 0 0 0" }} </div>
> <div className={styles.sectionContent}>
<div className={styles.noLocationContainer}> <div className={styles.noLocationContainer}>
<ProText type="secondary"> <ProText type="secondary">
{t("address.noLocationSelected")} {t("address.noLocationSelected")}
</ProText> </ProText>
<br />
<ProText type="secondary" className={styles.smallTextStyle}> <ProText type="secondary" className={styles.smallTextStyle}>
{t("address.clickEditToSelect")} {t("address.clickEditToSelect")}
</ProText> </ProText>
</div> </div>
</ProInputCard> </div>
<Button type="primary" className={styles.saveButton}> <Button type="primary" className={styles.saveButton}>
{t("orderDetails.save")} {t("orderDetails.save")}
</Button> </Button>