feat(BOOK-743): Replaced deprecated Button component
Approved-by: Bianca Widstam
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||
import { Button } from "@scandic-hotels/design-system/Button"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import useRedeemFlow from "./useRedeemFlow"
|
||||
@@ -42,17 +42,13 @@ export function ConfirmClose({ close }: { close: () => void }) {
|
||||
</Typography>
|
||||
</div>
|
||||
<footer className={styles.modalFooter}>
|
||||
<Button
|
||||
onClick={() => setRedeemStep("redeemed")}
|
||||
intent="primary"
|
||||
theme="base"
|
||||
>
|
||||
<Button onPress={() => setRedeemStep("redeemed")} variant="Primary">
|
||||
{intl.formatMessage({
|
||||
id: "redeem.confirmClose.goBack",
|
||||
defaultMessage: "No, go back",
|
||||
})}
|
||||
</Button>
|
||||
<Button onClick={close} intent="secondary" theme="base">
|
||||
<Button onPress={close} variant="Secondary">
|
||||
{intl.formatMessage({
|
||||
id: "redeem.confirmClose.confirm",
|
||||
defaultMessage: "Yes, close and remove benefit",
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { Button } from "@scandic-hotels/design-system/Button"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||
import { toast } from "@scandic-hotels/design-system/Toast"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function Campaign({ reward }: { reward: Campaign }) {
|
||||
</div>
|
||||
<footer className={styles.modalFooter}>
|
||||
<Button
|
||||
onClick={() => {
|
||||
onPress={() => {
|
||||
try {
|
||||
navigator.clipboard.writeText(reward.operaRewardId)
|
||||
toast.success(
|
||||
@@ -64,10 +64,8 @@ export default function Campaign({ reward }: { reward: Campaign }) {
|
||||
}
|
||||
}}
|
||||
type="button"
|
||||
variant="icon"
|
||||
size="small"
|
||||
theme="base"
|
||||
intent="primary"
|
||||
variant="Primary"
|
||||
size="sm"
|
||||
>
|
||||
<MaterialIcon icon="content_copy" color="CurrentColor" />
|
||||
{intl.formatMessage({
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { Button } from "@scandic-hotels/design-system/Button"
|
||||
import { JsonToHtml } from "@scandic-hotels/design-system/JsonToHtml"
|
||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { isRestaurantOnSiteTierReward } from "@/utils/rewards"
|
||||
@@ -87,9 +87,8 @@ export default function Tier({
|
||||
{redeemStep === "initial" && (
|
||||
<footer className={styles.modalFooter}>
|
||||
<Button
|
||||
onClick={() => setRedeemStep("confirmation")}
|
||||
intent="primary"
|
||||
theme="base"
|
||||
onPress={() => setRedeemStep("confirmation")}
|
||||
variant="Primary"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "redeemFlow.redeemBenefit",
|
||||
@@ -102,10 +101,9 @@ export default function Tier({
|
||||
{redeemStep === "confirmation" && (
|
||||
<footer className={styles.modalFooter}>
|
||||
<Button
|
||||
onClick={() => onRedeem(reward)}
|
||||
disabled={isRedeeming}
|
||||
intent="primary"
|
||||
theme="base"
|
||||
onPress={() => onRedeem(reward)}
|
||||
isDisabled={isRedeeming}
|
||||
variant="Primary"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "redeemFlow.yesRedeem",
|
||||
@@ -113,9 +111,8 @@ export default function Tier({
|
||||
})}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => setRedeemStep("initial")}
|
||||
intent="secondary"
|
||||
theme="base"
|
||||
onPress={() => setRedeemStep("initial")}
|
||||
variant="Secondary"
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "common.goBack",
|
||||
|
||||
Reference in New Issue
Block a user