Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import { useState } from 'react'
|
||||
import { Button as ButtonRAC } from 'react-aria-components'
|
||||
import { useIntl } from 'react-intl'
|
||||
import { useState } from "react"
|
||||
import { Button as ButtonRAC } from "react-aria-components"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { FacilityToIcon } from '../..//FacilityToIcon'
|
||||
import { Typography } from '../../Typography'
|
||||
import { FacilityToIcon } from "../..//FacilityToIcon"
|
||||
import { Typography } from "../../Typography"
|
||||
|
||||
import styles from './hotelDescription.module.css'
|
||||
import { FacilityEnum } from '@scandic-hotels/common/constants/facilities'
|
||||
import styles from "./hotelDescription.module.css"
|
||||
import { FacilityEnum } from "@scandic-hotels/common/constants/facilities"
|
||||
|
||||
export default function HotelDescription({
|
||||
description,
|
||||
@@ -29,13 +29,13 @@ export default function HotelDescription({
|
||||
}
|
||||
|
||||
const textShowMore = intl.formatMessage({
|
||||
id: 'common.showMore',
|
||||
defaultMessage: 'Show more',
|
||||
id: "common.showMore",
|
||||
defaultMessage: "Show more",
|
||||
})
|
||||
|
||||
const textShowLess = intl.formatMessage({
|
||||
id: 'common.showLess',
|
||||
defaultMessage: 'Show less',
|
||||
id: "common.showLess",
|
||||
defaultMessage: "Show less",
|
||||
})
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
||||
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
|
||||
|
||||
import { AlertTypeEnum } from '@scandic-hotels/common/constants/alert'
|
||||
import { FacilityEnum } from '@scandic-hotels/common/constants/facilities'
|
||||
import { fn } from 'storybook/test'
|
||||
import { Button } from '../Button'
|
||||
import { MaterialIcon } from '../Icons/MaterialIcon'
|
||||
import { HotelInfoCard } from './index'
|
||||
import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert"
|
||||
import { FacilityEnum } from "@scandic-hotels/common/constants/facilities"
|
||||
import { fn } from "storybook/test"
|
||||
import { Button } from "../Button"
|
||||
import { MaterialIcon } from "../Icons/MaterialIcon"
|
||||
import { HotelInfoCard } from "./index"
|
||||
|
||||
const meta: Meta<typeof HotelInfoCard> = {
|
||||
title: 'Product Components/HotelInfoCard',
|
||||
title: "Product Components/HotelInfoCard",
|
||||
component: HotelInfoCard,
|
||||
argTypes: {},
|
||||
}
|
||||
@@ -20,38 +20,38 @@ type Story = StoryObj<typeof HotelInfoCard>
|
||||
export const Default: Story = {
|
||||
argTypes: {
|
||||
alerts: {
|
||||
control: 'select',
|
||||
options: ['none', 'info', 'warning', 'alarm', 'success'],
|
||||
control: "select",
|
||||
options: ["none", "info", "warning", "alarm", "success"],
|
||||
mapping: {
|
||||
none: [],
|
||||
info: [
|
||||
{
|
||||
id: '1',
|
||||
heading: 'Hot dog alert',
|
||||
id: "1",
|
||||
heading: "Hot dog alert",
|
||||
text: `They are handing out free hot dogs available in the square outside the hotel.`,
|
||||
type: AlertTypeEnum.Info,
|
||||
},
|
||||
],
|
||||
warning: [
|
||||
{
|
||||
id: '1',
|
||||
heading: 'Construction work',
|
||||
id: "1",
|
||||
heading: "Construction work",
|
||||
text: `There is construction work going on outside the hotel. Expect some noise during daytime.`,
|
||||
type: AlertTypeEnum.Warning,
|
||||
},
|
||||
],
|
||||
success: [
|
||||
{
|
||||
id: '1',
|
||||
heading: 'Free breakfast',
|
||||
id: "1",
|
||||
heading: "Free breakfast",
|
||||
text: `We are now serving free breakfast in the lobby between 7-10am.`,
|
||||
type: AlertTypeEnum.Success,
|
||||
},
|
||||
],
|
||||
alarm: [
|
||||
{
|
||||
id: '1',
|
||||
heading: 'Fire alarm',
|
||||
id: "1",
|
||||
heading: "Fire alarm",
|
||||
text: `The fire alarm is activated. Please evacuate the building immediately using the nearest exit.`,
|
||||
type: AlertTypeEnum.Alarm,
|
||||
},
|
||||
@@ -60,11 +60,11 @@ export const Default: Story = {
|
||||
},
|
||||
|
||||
slot: {
|
||||
control: 'select',
|
||||
description: 'A slot where you can inject components',
|
||||
options: ['none', 'button'],
|
||||
control: "select",
|
||||
description: "A slot where you can inject components",
|
||||
options: ["none", "button"],
|
||||
table: {
|
||||
defaultValue: { summary: 'button' },
|
||||
defaultValue: { summary: "button" },
|
||||
},
|
||||
mapping: {
|
||||
none: null,
|
||||
@@ -78,40 +78,40 @@ export const Default: Story = {
|
||||
},
|
||||
args: {
|
||||
hotel: {
|
||||
id: '1',
|
||||
name: 'Grand Hotel Budapest',
|
||||
url: 'https://www.scandichotels.com/en/hello',
|
||||
id: "1",
|
||||
name: "Grand Hotel Budapest",
|
||||
url: "https://www.scandichotels.com/en/hello",
|
||||
ratings: {
|
||||
tripAdvisor: { rating: 4.5 },
|
||||
},
|
||||
},
|
||||
address: {
|
||||
city: 'Budapest',
|
||||
city: "Budapest",
|
||||
kilometersToCentre: 0.5,
|
||||
streetAddress: '1 Main St',
|
||||
streetAddress: "1 Main St",
|
||||
},
|
||||
description:
|
||||
"Escape to the crown jewel of the Republic of Zubrowka, where timeless luxury awaits atop our breathtaking mountain sanctuary. The Grand Budapest Hotel stands as Europe's most distinguished retreat, a rose-colored palace that has welcomed discerning guests since the golden age of travel.",
|
||||
facilities: [
|
||||
{ id: FacilityEnum.AirConAirCooling, name: 'Air Conditioning' },
|
||||
{ id: FacilityEnum.FoodDrinks247, name: 'Food & Drinks 24/7' },
|
||||
{ id: FacilityEnum.KayaksForLoan, name: 'Kayaks for Loan' },
|
||||
{ id: FacilityEnum.AirConAirCooling, name: "Air Conditioning" },
|
||||
{ id: FacilityEnum.FoodDrinks247, name: "Food & Drinks 24/7" },
|
||||
{ id: FacilityEnum.KayaksForLoan, name: "Kayaks for Loan" },
|
||||
],
|
||||
galleryImages: [
|
||||
{
|
||||
src: './img/GrandHotelBudapest.png',
|
||||
alt: 'Grand Hotel Budapest',
|
||||
caption: 'Grand Hotel Budapest',
|
||||
src: "./img/GrandHotelBudapest.png",
|
||||
alt: "Grand Hotel Budapest",
|
||||
caption: "Grand Hotel Budapest",
|
||||
},
|
||||
{
|
||||
src: './img/img1.png',
|
||||
alt: 'Image 1',
|
||||
caption: 'Image 1',
|
||||
src: "./img/img1.png",
|
||||
alt: "Image 1",
|
||||
caption: "Image 1",
|
||||
},
|
||||
{
|
||||
src: './img/img2.png',
|
||||
alt: 'Image 2',
|
||||
caption: 'Image 2',
|
||||
src: "./img/img2.png",
|
||||
alt: "Image 2",
|
||||
caption: "Image 2",
|
||||
},
|
||||
],
|
||||
alerts: [],
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import { getSingleDecimal } from '@scandic-hotels/common/utils/numberFormatting'
|
||||
import { Alert } from '../Alert'
|
||||
import { Divider } from '../Divider'
|
||||
import { FacilityToIcon } from '../FacilityToIcon'
|
||||
import ImageGallery, { GalleryImage } from '../ImageGallery'
|
||||
import SkeletonShimmer from '../SkeletonShimmer'
|
||||
import { TripAdvisorChip } from '../TripAdvisorChip'
|
||||
import { Typography } from '../Typography'
|
||||
import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting"
|
||||
import { Alert } from "../Alert"
|
||||
import { Divider } from "../Divider"
|
||||
import { FacilityToIcon } from "../FacilityToIcon"
|
||||
import ImageGallery, { GalleryImage } from "../ImageGallery"
|
||||
import SkeletonShimmer from "../SkeletonShimmer"
|
||||
import { TripAdvisorChip } from "../TripAdvisorChip"
|
||||
import { Typography } from "../Typography"
|
||||
|
||||
import HotelDescription from './HotelDescription'
|
||||
import HotelDescription from "./HotelDescription"
|
||||
|
||||
import styles from './hotelInfoCard.module.css'
|
||||
import { useIntl } from 'react-intl'
|
||||
import { AlertTypeEnum } from '@scandic-hotels/common/constants/alert'
|
||||
import { FacilityEnum } from '@scandic-hotels/common/constants/facilities'
|
||||
import styles from "./hotelInfoCard.module.css"
|
||||
import { useIntl } from "react-intl"
|
||||
import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert"
|
||||
import { FacilityEnum } from "@scandic-hotels/common/constants/facilities"
|
||||
|
||||
export type HotelInfoCardProps = {
|
||||
hotel: {
|
||||
@@ -32,7 +32,7 @@ export type HotelInfoCardProps = {
|
||||
kilometersToCentre: number
|
||||
}
|
||||
galleryImages: GalleryImage[]
|
||||
alerts: SpecialAlertProps['alert'][]
|
||||
alerts: SpecialAlertProps["alert"][]
|
||||
facilities: {
|
||||
id: FacilityEnum
|
||||
name: string
|
||||
@@ -72,9 +72,9 @@ export function HotelInfoCard({
|
||||
<p className={styles.hotelAddress}>
|
||||
{intl.formatMessage(
|
||||
{
|
||||
id: 'hotelInfoCard.kmToCityCenter',
|
||||
id: "hotelInfoCard.kmToCityCenter",
|
||||
defaultMessage:
|
||||
'{address}, {city} ∙ {distanceToCityCenterInKm} km to city center',
|
||||
"{address}, {city} ∙ {distanceToCityCenterInKm} km to city center",
|
||||
},
|
||||
{
|
||||
address: address.streetAddress,
|
||||
|
||||
Reference in New Issue
Block a user