Merged in refactor/small-cleanup (pull request #3252)
fix: some cleanup * fix: some cleanup Approved-by: Emma Zettervall
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Space-x2);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
||||
@@ -6,11 +6,10 @@ import {
|
||||
ModalOverlay,
|
||||
} from "react-aria-components"
|
||||
|
||||
import Body from "@scandic-hotels/design-system/Body"
|
||||
import { Button } from "@scandic-hotels/design-system/Button"
|
||||
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
||||
import { LoadingSpinner } from "@scandic-hotels/design-system/LoadingSpinner"
|
||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import styles from "./dialog.module.css"
|
||||
|
||||
@@ -35,40 +34,42 @@ export default function Dialog({
|
||||
{({ close }) => (
|
||||
<section className={styles.modal}>
|
||||
<header className={styles.header}>
|
||||
<Subtitle textAlign="center">{titleText}</Subtitle>
|
||||
<Body textAlign="center">{bodyText}</Body>
|
||||
<Typography variant="Title/Subtitle/md">
|
||||
<p>{titleText}</p>
|
||||
</Typography>
|
||||
<Typography>
|
||||
<p>{bodyText}</p>
|
||||
</Typography>
|
||||
</header>
|
||||
{proceedIsPending ? (
|
||||
<LoadingSpinner />
|
||||
) : (
|
||||
<footer className={styles.footer}>
|
||||
<Button
|
||||
intent="secondary"
|
||||
variant="Secondary"
|
||||
onPress={close}
|
||||
size="medium"
|
||||
theme="base"
|
||||
size="Medium"
|
||||
color="Primary"
|
||||
>
|
||||
{cancelButtonText}
|
||||
</Button>
|
||||
{proceedHref ? (
|
||||
<Button
|
||||
asChild
|
||||
intent="primary"
|
||||
size="medium"
|
||||
theme="base"
|
||||
<ButtonLink
|
||||
variant="Primary"
|
||||
color="Primary"
|
||||
size="Medium"
|
||||
href={proceedHref}
|
||||
>
|
||||
<Link color="none" href={proceedHref}>
|
||||
{proceedText}
|
||||
</Link>
|
||||
</Button>
|
||||
{proceedText}
|
||||
</ButtonLink>
|
||||
) : (
|
||||
<Button
|
||||
intent="primary"
|
||||
variant="Primary"
|
||||
color="Primary"
|
||||
onPress={() => {
|
||||
proceedOnClick(close)
|
||||
}}
|
||||
size="medium"
|
||||
theme="base"
|
||||
size="Medium"
|
||||
>
|
||||
{proceedText}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user