feat(SW-415): Update typings
This commit is contained in:
@@ -1,18 +1,10 @@
|
||||
import {
|
||||
Button,
|
||||
Dialog,
|
||||
OverlayArrow,
|
||||
Popover,
|
||||
type PopoverProps,
|
||||
} from "react-aria-components"
|
||||
import { Button, Dialog, OverlayArrow, Popover } from "react-aria-components"
|
||||
|
||||
import { CloseIcon } from "@/components/Icons"
|
||||
|
||||
import styles from "./popover.module.css"
|
||||
|
||||
interface PricePopoverProps extends Omit<PopoverProps, "children"> {
|
||||
children: React.ReactNode
|
||||
}
|
||||
import { PricePopoverProps } from "@/types/components/hotelReservation/selectRate/pricePopover"
|
||||
|
||||
export default function PricePopover({
|
||||
children,
|
||||
|
||||
@@ -4,25 +4,25 @@ import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||
|
||||
import styles from "./priceTable.module.css"
|
||||
import styles from "./priceList.module.css"
|
||||
|
||||
import { PriceTableProps } from "@/types/components/hotelReservation/selectRate/flexibilityOption"
|
||||
import { PriceListProps } from "@/types/components/hotelReservation/selectRate/flexibilityOption"
|
||||
|
||||
export default function PriceTable({
|
||||
publicPrice,
|
||||
memberPrice,
|
||||
}: PriceTableProps) {
|
||||
export default function PriceList({
|
||||
publicPrice = {},
|
||||
memberPrice = {},
|
||||
}: PriceListProps) {
|
||||
const intl = useIntl()
|
||||
|
||||
const { localPrice: publicLocalPrice, requestedPrice: publicRequestedPrice } =
|
||||
publicPrice || {}
|
||||
publicPrice
|
||||
const { localPrice: memberLocalPrice, requestedPrice: memberRequestedPrice } =
|
||||
memberPrice || {}
|
||||
memberPrice
|
||||
|
||||
const showRequestedPrice = publicRequestedPrice && memberRequestedPrice
|
||||
|
||||
return (
|
||||
<dl className={styles.priceTable}>
|
||||
<dl className={styles.priceList}>
|
||||
<div className={styles.priceRow}>
|
||||
<dt>
|
||||
<Caption
|
||||
@@ -6,7 +6,7 @@ import { CheckCircleIcon, InfoCircleIcon } from "@/components/Icons"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
|
||||
import PricePopover from "./Popover"
|
||||
import PriceTable from "./PriceTable"
|
||||
import PriceTable from "./PriceList"
|
||||
|
||||
import styles from "./flexibilityOption.module.css"
|
||||
|
||||
@@ -40,17 +40,13 @@ export default function FlexibilityOption({
|
||||
)
|
||||
}
|
||||
|
||||
const { productType } = product
|
||||
const { public: publicPrice, member: memberPrice } = productType
|
||||
const { public: publicPrice, member: memberPrice } = product.productType
|
||||
|
||||
return (
|
||||
<label>
|
||||
<input type="radio" name="rateCode" value={publicPrice?.rateCode} />
|
||||
<div className={styles.card}>
|
||||
<div
|
||||
className={styles.header}
|
||||
ref={(node: Element | null) => setRef(node)}
|
||||
>
|
||||
<div className={styles.header} ref={setRef}>
|
||||
<DialogTrigger>
|
||||
<Button
|
||||
aria-label="Help"
|
||||
@@ -82,7 +78,7 @@ export default function FlexibilityOption({
|
||||
>
|
||||
{name}
|
||||
</Caption>
|
||||
{priceInformation?.map((info: string) => (
|
||||
{priceInformation?.map((info) => (
|
||||
<Caption
|
||||
key={info}
|
||||
color="uiTextHighContrast"
|
||||
|
||||
Reference in New Issue
Block a user