Merged in feat/sw-3145-move-iconchip-to-design-system (pull request #2588)
feat(SW-3145): Move IconChip to design-system * Move IconChip to design-system Approved-by: Hrishikesh Vaipurkar
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
import { Button as ButtonRAC } from "react-aria-components"
|
import { Button as ButtonRAC } from "react-aria-components"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
|
import IconChip from "@scandic-hotels/design-system/IconChip"
|
||||||
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
||||||
import FilledDiscountIcon from "@scandic-hotels/design-system/Icons/FilledDiscountIcon"
|
import FilledDiscountIcon from "@scandic-hotels/design-system/Icons/FilledDiscountIcon"
|
||||||
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"
|
||||||
|
|
||||||
import IconChip from "../TempDesignSystem/IconChip"
|
|
||||||
|
|
||||||
import styles from "./bookingCodeChip.module.css"
|
import styles from "./bookingCodeChip.module.css"
|
||||||
|
|
||||||
type BaseBookingCodeChipProps = {
|
type BaseBookingCodeChipProps = {
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
"use client"
|
"use client"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
|
import IconChip from "@scandic-hotels/design-system/IconChip"
|
||||||
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useMyStayStore } from "@/stores/my-stay"
|
import { useMyStayStore } from "@/stores/my-stay"
|
||||||
|
|
||||||
import IconChip from "@/components/TempDesignSystem/IconChip"
|
|
||||||
|
|
||||||
import styles from "./bookingCode.module.css"
|
import styles from "./bookingCode.module.css"
|
||||||
|
|
||||||
export default function BookingCode() {
|
export default function BookingCode() {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useIntl } from "react-intl"
|
|||||||
import { dt } from "@scandic-hotels/common/dt"
|
import { dt } from "@scandic-hotels/common/dt"
|
||||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||||
import { IconButton } from "@scandic-hotels/design-system/IconButton"
|
import { IconButton } from "@scandic-hotels/design-system/IconButton"
|
||||||
|
import IconChip from "@scandic-hotels/design-system/IconChip"
|
||||||
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"
|
||||||
import { RateEnum } from "@scandic-hotels/trpc/enums/rate"
|
import { RateEnum } from "@scandic-hotels/trpc/enums/rate"
|
||||||
@@ -15,7 +16,6 @@ import { changeOrCancelDateFormat } from "@/constants/dateFormats"
|
|||||||
import { IconForFeatureCode } from "@/components/HotelReservation/utils"
|
import { IconForFeatureCode } from "@/components/HotelReservation/utils"
|
||||||
import Image from "@/components/Image"
|
import Image from "@/components/Image"
|
||||||
import Modal from "@/components/Modal"
|
import Modal from "@/components/Modal"
|
||||||
import IconChip from "@/components/TempDesignSystem/IconChip"
|
|
||||||
import useRateTitles from "@/hooks/booking/useRateTitles"
|
import useRateTitles from "@/hooks/booking/useRateTitles"
|
||||||
import useLang from "@/hooks/useLang"
|
import useLang from "@/hooks/useLang"
|
||||||
import { formatPrice } from "@/utils/numberFormatting"
|
import { formatPrice } from "@/utils/numberFormatting"
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
"use client"
|
"use client"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
|
import IconChip from "@scandic-hotels/design-system/IconChip"
|
||||||
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import { useMyStayStore } from "@/stores/my-stay"
|
import { useMyStayStore } from "@/stores/my-stay"
|
||||||
|
|
||||||
import IconChip from "@/components/TempDesignSystem/IconChip"
|
|
||||||
|
|
||||||
export default function BookingCode() {
|
export default function BookingCode() {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { dt } from "@scandic-hotels/common/dt"
|
import { dt } from "@scandic-hotels/common/dt"
|
||||||
|
import IconChip from "@scandic-hotels/design-system/IconChip"
|
||||||
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
||||||
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"
|
||||||
@@ -15,7 +16,6 @@ import { sumPackages } from "@/components/HotelReservation/utils"
|
|||||||
import ImageGallery from "@/components/ImageGallery"
|
import ImageGallery from "@/components/ImageGallery"
|
||||||
import Accordion from "@/components/TempDesignSystem/Accordion"
|
import Accordion from "@/components/TempDesignSystem/Accordion"
|
||||||
import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem"
|
import AccordionItem from "@/components/TempDesignSystem/Accordion/AccordionItem"
|
||||||
import IconChip from "@/components/TempDesignSystem/IconChip"
|
|
||||||
import SidePeekSelfControlled from "@/components/TempDesignSystem/SidePeekSelfControlled"
|
import SidePeekSelfControlled from "@/components/TempDesignSystem/SidePeekSelfControlled"
|
||||||
import useLang from "@/hooks/useLang"
|
import useLang from "@/hooks/useLang"
|
||||||
import { mapApiImagesToGalleryImages } from "@/utils/imageGallery"
|
import { mapApiImagesToGalleryImages } from "@/utils/imageGallery"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { iconChipVariants } from "./variants"
|
import { iconChipVariants } from './variants'
|
||||||
|
|
||||||
interface IconChipProps {
|
interface IconChipProps {
|
||||||
color: "blue" | "green" | "red" | null | undefined
|
color: 'blue' | 'green' | 'red' | null | undefined
|
||||||
icon: React.ReactNode
|
icon: React.ReactNode
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
className?: string
|
className?: string
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { cva } from "class-variance-authority"
|
import { cva } from 'class-variance-authority'
|
||||||
|
|
||||||
import styles from "./iconChip.module.css"
|
import styles from './iconChip.module.css'
|
||||||
|
|
||||||
export const iconChipVariants = cva(styles.chip, {
|
export const iconChipVariants = cva(styles.chip, {
|
||||||
variants: {
|
variants: {
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
"./Form/ErrorMessage": "./dist/components/Form/ErrorMessage/index.js",
|
"./Form/ErrorMessage": "./dist/components/Form/ErrorMessage/index.js",
|
||||||
"./Form/Phone": "./dist/components/Form/Phone/index.js",
|
"./Form/Phone": "./dist/components/Form/Phone/index.js",
|
||||||
"./Form/RadioCard": "./dist/components/Form/RadioCard/index.js",
|
"./Form/RadioCard": "./dist/components/Form/RadioCard/index.js",
|
||||||
|
"./IconChip": "./dist/components/IconChip/index.js",
|
||||||
"./Input": "./dist/components/Input/index.js",
|
"./Input": "./dist/components/Input/index.js",
|
||||||
"./Label": "./dist/components/Label/index.js",
|
"./Label": "./dist/components/Label/index.js",
|
||||||
"./OldDSButton": "./dist/components/OldDSButton/index.js",
|
"./OldDSButton": "./dist/components/OldDSButton/index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user