feat: SW-602 Implemented no availability states
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
"use client"
|
||||
import { useRef, useState } from "react"
|
||||
import { Button } from "react-aria-components"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { CheckIcon, InfoCircleIcon } from "@/components/Icons"
|
||||
import Label from "@/components/TempDesignSystem/Form/Label"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
|
||||
import PricePopover from "./Popover"
|
||||
@@ -27,6 +29,7 @@ export default function FlexibilityOption({
|
||||
const [isPopoverOpen, setIsPopoverOpen] = useState(false)
|
||||
let triggerRef = useRef<HTMLButtonElement>(null)
|
||||
const buttonClickedRef = useRef(false)
|
||||
const intl = useIntl()
|
||||
|
||||
function setRef(node: Element | null) {
|
||||
if (node) {
|
||||
@@ -36,13 +39,17 @@ export default function FlexibilityOption({
|
||||
|
||||
if (!product) {
|
||||
return (
|
||||
<div className={styles.disabledCard}>
|
||||
<div className={styles.noPricesCard}>
|
||||
<div className={styles.header}>
|
||||
<InfoCircleIcon width={16} height={16} color="uiTextMediumContrast" />
|
||||
<Caption color="disabled">{name}</Caption>
|
||||
<Caption color="disabled">({paymentTerm})</Caption>
|
||||
<Caption>{name}</Caption>
|
||||
<Caption color="uiTextPlaceholder">({paymentTerm})</Caption>
|
||||
</div>
|
||||
<PriceTable />
|
||||
<Label size="regular" className={styles.noPricesLabel}>
|
||||
<Caption color="uiTextHighContrast" type="bold">
|
||||
{intl.formatMessage({ id: "No Prices available" })}
|
||||
</Caption>
|
||||
</Label>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user