Files
web/apps/scandic-web/components/HotelReservation/MyStay/Modal/ModalContent/Footer/index.tsx
Hrishikesh Vaipurkar d8f9376cd7 Merged in chore/SW-3145-move-button (pull request #2531)
chore: SW-3145 Moved Button component from TempDS to Design System package

* chore: SW-3145 Moved Button compoenent from TempDS to Design System package


Approved-by: Anton Gunnarsson
2025-07-07 11:13:44 +00:00

66 lines
1.3 KiB
TypeScript

import {
type ButtonProps as _ButtonProps,
OldDSButton as Button,
} from "@scandic-hotels/design-system/OldDSButton"
import styles from "./footer.module.css"
import type { ButtonHTMLAttributes, PropsWithChildren } from "react"
import type { ButtonProps as ReactAriaButtonProps } from "react-aria-components"
export default function Footer({ children }: PropsWithChildren) {
return <footer className={styles.footer}>{children}</footer>
}
interface ButtonProps extends PropsWithChildren {
intent?: _ButtonProps["intent"]
onClick?: ReactAriaButtonProps["onPress"]
type?: ButtonHTMLAttributes<HTMLButtonElement>["type"]
}
interface PrimaryButtonProps extends ButtonProps {
disabled?: boolean
form?: string
}
Footer.Primary = function PrimaryButton({
children,
disabled = false,
form,
intent = "primary",
onClick,
type = "button",
}: PrimaryButtonProps) {
return (
<Button
disabled={disabled}
form={form}
intent={intent}
onClick={onClick}
theme="base"
type={type}
>
{children}
</Button>
)
}
Footer.Secondary = function SecondaryButton({
children,
intent = "text",
onClick,
type = "button",
}: ButtonProps) {
return (
<Button
color="burgundy"
intent={intent}
onClick={onClick}
theme="base"
type={type}
>
{children}
</Button>
)
}