feat(SW-2038): refactor and create wrapper for static map and button * feat(SW-2038): refactor and create wrapper for static map and button * feature: use button from design-system over creating a new one * remove unused fragment * fix(SW-2038): add removed css * fix(SW-2038): update fake button component * fix(SW-2038): move FakeButton to design system Approved-by: Erik Tiekstra Approved-by: Joakim Jäderberg
29 lines
805 B
TypeScript
29 lines
805 B
TypeScript
"use client"
|
|
import { useIntl } from "react-intl"
|
|
|
|
import { FakeButton } from "@scandic-hotels/design-system/FakeButton"
|
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
|
|
|
import styles from "./mapWithButtonWrapper.module.css"
|
|
|
|
export function MapWithButtonWrapper({ children }: React.PropsWithChildren) {
|
|
const intl = useIntl()
|
|
return (
|
|
<div className={styles.container}>
|
|
{children}
|
|
<FakeButton
|
|
variant="Primary"
|
|
color="Inverted"
|
|
size="Small"
|
|
typography="Body/Supporting text (caption)/smBold"
|
|
className={styles.button}
|
|
>
|
|
<MaterialIcon icon="map" color="CurrentColor" size={20} />
|
|
{intl.formatMessage({
|
|
defaultMessage: "See on map",
|
|
})}
|
|
</FakeButton>
|
|
</div>
|
|
)
|
|
}
|