Merged in feat/SW-3276-hotel-page-phone-number (pull request #2703)
feat(SW-3276): update hotel page intro section * feat(SW-3276): update hotel page intro section * fix(SW-3276): update Link component Approved-by: Erik Tiekstra
This commit is contained in:
@@ -50,9 +50,10 @@ export default async function TripAdvisorLink({
|
|||||||
variant="icon"
|
variant="icon"
|
||||||
textDecoration="underline"
|
textDecoration="underline"
|
||||||
color="Text/Interactive/Secondary"
|
color="Text/Interactive/Secondary"
|
||||||
|
size="small"
|
||||||
href={tripAdvisorHref}
|
href={tripAdvisorHref}
|
||||||
>
|
>
|
||||||
<TripadvisorIcon color="CurrentColor" />
|
<TripadvisorIcon color="CurrentColor" size={20} />
|
||||||
{formattedTripAdvisorText}
|
{formattedTripAdvisorText}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting"
|
import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting"
|
||||||
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
||||||
|
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
@@ -9,8 +10,23 @@ import TripAdvisorLink from "./TripAdvisorLink"
|
|||||||
|
|
||||||
import styles from "./introSection.module.css"
|
import styles from "./introSection.module.css"
|
||||||
|
|
||||||
|
import type {
|
||||||
|
Hotel,
|
||||||
|
HotelAddress,
|
||||||
|
HotelLocation,
|
||||||
|
HotelTripAdvisor,
|
||||||
|
} from "@scandic-hotels/trpc/types/hotel"
|
||||||
|
|
||||||
import { SidepeekSlugs } from "@/types/components/hotelPage/hotelPage"
|
import { SidepeekSlugs } from "@/types/components/hotelPage/hotelPage"
|
||||||
import type { IntroSectionProps } from "./types"
|
|
||||||
|
interface IntroSectionProps {
|
||||||
|
address: HotelAddress
|
||||||
|
hotelDescription: string | undefined
|
||||||
|
hotelName: Hotel["name"]
|
||||||
|
location: HotelLocation
|
||||||
|
tripAdvisor: HotelTripAdvisor
|
||||||
|
phoneNumber: string
|
||||||
|
}
|
||||||
|
|
||||||
export default async function IntroSection({
|
export default async function IntroSection({
|
||||||
hotelName,
|
hotelName,
|
||||||
@@ -18,6 +34,7 @@ export default async function IntroSection({
|
|||||||
location,
|
location,
|
||||||
address,
|
address,
|
||||||
tripAdvisor,
|
tripAdvisor,
|
||||||
|
phoneNumber,
|
||||||
}: IntroSectionProps) {
|
}: IntroSectionProps) {
|
||||||
const intl = await getIntl()
|
const intl = await getIntl()
|
||||||
const { streetAddress, city } = address
|
const { streetAddress, city } = address
|
||||||
@@ -46,10 +63,27 @@ export default async function IntroSection({
|
|||||||
<h1 className={styles.title}>{hotelName}</h1>
|
<h1 className={styles.title}>{hotelName}</h1>
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
<Typography variant="Body/Supporting text (caption)/smRegular">
|
<address className={styles.adressPhoneNumber}>
|
||||||
<p className={styles.bodyText}>{formattedLocationText}</p>
|
<span className={styles.location}>
|
||||||
</Typography>
|
<span className={styles.address}>
|
||||||
|
<MaterialIcon icon="location_on" color="CurrentColor" size={20} />
|
||||||
|
<Typography variant="Body/Supporting text (caption)/smRegular">
|
||||||
|
<p>{formattedLocationText}</p>
|
||||||
|
</Typography>
|
||||||
|
</span>
|
||||||
|
<Divider
|
||||||
|
variant="vertical"
|
||||||
|
color="Border/Divider/Default"
|
||||||
|
className={styles.divider}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<Typography variant="Body/Underline/sm">
|
||||||
|
<a href={`tel:${phoneNumber}`} className={styles.phoneNumber}>
|
||||||
|
<MaterialIcon icon="phone" color="CurrentColor" size={20} />
|
||||||
|
{phoneNumber}
|
||||||
|
</a>
|
||||||
|
</Typography>
|
||||||
|
</address>
|
||||||
{tripAdvisor ? <TripAdvisorLink tripAdvisor={tripAdvisor} /> : null}
|
{tripAdvisor ? <TripAdvisorLink tripAdvisor={tripAdvisor} /> : null}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.subtitleContent}>
|
<div className={styles.subtitleContent}>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
.mainContent {
|
.mainContent {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Space-x1);
|
gap: var(--Space-x15);
|
||||||
justify-items: start;
|
justify-items: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,10 +21,6 @@
|
|||||||
color: var(--Text-Heading);
|
color: var(--Text-Heading);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bodyText {
|
|
||||||
color: var(--Text-Secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.script {
|
.script {
|
||||||
transform: rotate(-4deg);
|
transform: rotate(-4deg);
|
||||||
color: var(--Text-Accent-Primary);
|
color: var(--Text-Accent-Primary);
|
||||||
@@ -34,3 +30,45 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--Space-x2);
|
gap: var(--Space-x2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.adressPhoneNumber {
|
||||||
|
font-style: normal;
|
||||||
|
display: grid;
|
||||||
|
gap: var(--Space-x15);
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phoneNumber {
|
||||||
|
color: var(--Text-Interactive-Default);
|
||||||
|
display: flex;
|
||||||
|
gap: var(--Space-x05);
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.address {
|
||||||
|
color: var(--Text-Secondary);
|
||||||
|
gap: var(--Space-x05);
|
||||||
|
align-items: start;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.location {
|
||||||
|
display: flex;
|
||||||
|
gap: var(--Space-x2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 767px) {
|
||||||
|
.adressPhoneNumber {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: var(--Space-x2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.address {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
import type {
|
|
||||||
Hotel,
|
|
||||||
HotelAddress,
|
|
||||||
HotelLocation,
|
|
||||||
HotelTripAdvisor,
|
|
||||||
} from "@scandic-hotels/trpc/types/hotel"
|
|
||||||
|
|
||||||
export type IntroSectionProps = {
|
|
||||||
address: HotelAddress
|
|
||||||
hotelDescription: string | undefined
|
|
||||||
hotelName: Hotel["name"]
|
|
||||||
location: HotelLocation
|
|
||||||
tripAdvisor: HotelTripAdvisor
|
|
||||||
}
|
|
||||||
@@ -182,6 +182,7 @@ export default async function HotelPage({ hotelId }: HotelPageProps) {
|
|||||||
location={location}
|
location={location}
|
||||||
address={address}
|
address={address}
|
||||||
tripAdvisor={ratings?.tripAdvisor}
|
tripAdvisor={ratings?.tripAdvisor}
|
||||||
|
phoneNumber={contactInformation.phoneNumber}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AmenitiesList detailedFacilities={detailedFacilities} />
|
<AmenitiesList detailedFacilities={detailedFacilities} />
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ function PrimaryLinks({ handleOnClick }: { handleOnClick: () => void }) {
|
|||||||
<Link
|
<Link
|
||||||
href={link.href}
|
href={link.href}
|
||||||
partialMatch
|
partialMatch
|
||||||
size="regular"
|
size="large"
|
||||||
variant="myPageMobileDropdown"
|
variant="myPageMobileDropdown"
|
||||||
onClick={handleOnClick}
|
onClick={handleOnClick}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -117,22 +117,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.regular {
|
.large {
|
||||||
font-family: var(--typography-Body-Regular-fontFamily);
|
font-family: var(--Link-md-Font-family);
|
||||||
font-size: var(--typography-Body-Regular-fontSize);
|
font-size: var(--Link-md-Size);
|
||||||
font-weight: 400;
|
font-weight: var(--Link-md-Font-weight);
|
||||||
letter-spacing: var(--typography-Body-Regular-letterSpacing);
|
letter-spacing: var(--Link-md-Letter-spacing);
|
||||||
line-height: var(--typography-Body-Regular-lineHeight);
|
line-height: 150%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small {
|
.small {
|
||||||
font-family: var(--typography-Caption-Regular-fontFamily);
|
font-family: var(--Link-sm-Font-family);
|
||||||
font-size: var(--typography-Caption-Regular-fontSize);
|
font-size: var(--Link-sm-Size);
|
||||||
font-weight: 400;
|
font-weight: var(--Link-sm-Font-weight);
|
||||||
letter-spacing: var(--typography-Caption-Regular-letterSpacing);
|
letter-spacing: var(--Link-sm-Letter-spacing);
|
||||||
line-height: var(--typography-Caption-Regular-lineHeight);
|
line-height: 140%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Tiny should be removed, it's not a variant of the Link*/
|
||||||
.tiny {
|
.tiny {
|
||||||
font-family: var(--typography-Footnote-Regular-fontFamily);
|
font-family: var(--typography-Footnote-Regular-fontFamily);
|
||||||
font-size: var(--typography-Footnote-Regular-fontSize);
|
font-size: var(--typography-Footnote-Regular-fontSize);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const linkVariants = cva(styles.link, {
|
|||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
small: styles.small,
|
small: styles.small,
|
||||||
regular: styles.regular,
|
large: styles.large,
|
||||||
tiny: styles.tiny,
|
tiny: styles.tiny,
|
||||||
none: '',
|
none: '',
|
||||||
},
|
},
|
||||||
@@ -39,6 +39,6 @@ export const linkVariants = cva(styles.link, {
|
|||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
color: 'Text/Interactive/Default',
|
color: 'Text/Interactive/Default',
|
||||||
size: 'regular',
|
size: 'large',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user