From 93aafe5525b13c96eda9eef2d7ebee99e15f29f4 Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Mon, 31 Mar 2025 12:27:32 +0000 Subject: [PATCH] Merged in fix/lint-issues (pull request #1678) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix lint issues in design-system and scandic-web * Remove unused color prop from LogoAndIllustrationProps to fix lint issues * Fix lint issues in web * Fix logos type Approved-by: Joakim Jäderberg --- .../JoinLoyalty/Contact/ContactRow/index.tsx | 15 +++++++++------ .../Customised/Amenities&Facilities/Cooling.tsx | 7 +------ .../lib/components/Icons/Illustrations/Bed.tsx | 4 ++-- .../components/Icons/Illustrations/BedBunk.tsx | 7 ++----- .../Icons/Illustrations/BedBunkExtra.tsx | 7 ++----- .../components/Icons/Illustrations/BedGeneric.tsx | 7 ++----- .../components/Icons/Illustrations/BedKing.tsx | 7 ++----- .../components/Icons/Illustrations/BedPullOut.tsx | 7 ++----- .../Icons/Illustrations/BedPullOutExtra.tsx | 7 ++----- .../components/Icons/Illustrations/BedQueen.tsx | 7 ++----- .../components/Icons/Illustrations/BedSingle.tsx | 7 ++----- .../components/Icons/Illustrations/BedSofa.tsx | 7 ++----- .../Icons/Illustrations/BedSofaExtra.tsx | 7 ++----- .../components/Icons/Illustrations/BedTwin.tsx | 7 ++----- .../Icons/Illustrations/BedWallExtra.tsx | 7 ++----- .../lib/components/Icons/Illustrations/Coin.tsx | 7 ++----- .../Icons/Illustrations/CroissantCoffeeEgg.tsx | 7 ++----- .../components/Icons/Illustrations/CutleryOne.tsx | 7 ++----- .../components/Icons/Illustrations/CutleryTwo.tsx | 7 ++----- .../components/Icons/Illustrations/GiftOpen.tsx | 7 ++----- .../components/Icons/Illustrations/HandKey.tsx | 7 ++----- .../components/Icons/Illustrations/HotelNight.tsx | 7 ++----- .../lib/components/Icons/Illustrations/Kids.tsx | 7 ++----- .../Icons/Illustrations/KidsMocktail.tsx | 7 ++----- .../components/Icons/Illustrations/MagicWand.tsx | 7 ++----- .../components/Icons/Illustrations/MoneyHand.tsx | 7 ++----- .../components/Icons/Illustrations/Surprise.tsx | 7 ++----- .../components/Icons/Illustrations/Voucher.tsx | 7 ++----- .../lib/components/Icons/Logos/DowntownCamper.tsx | 4 ++-- .../lib/components/Icons/Logos/GrandHotelOslo.tsx | 4 ++-- .../lib/components/Icons/Logos/Haymarket.tsx | 4 ++-- .../lib/components/Icons/Logos/HotelNorge.tsx | 4 ++-- .../lib/components/Icons/Logos/Marski.tsx | 4 ++-- .../lib/components/Icons/Logos/ScandicGoLogo.tsx | 4 ++-- .../lib/components/Icons/Logos/ScandicLogo.tsx | 4 ++-- .../design-system/lib/components/Icons/icon.ts | 9 ++++++++- .../design-system/lib/components/Icons/index.tsx | 2 +- 37 files changed, 85 insertions(+), 155 deletions(-) diff --git a/apps/scandic-web/components/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx b/apps/scandic-web/components/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx index 6890df1e9..90e7787ae 100644 --- a/apps/scandic-web/components/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx +++ b/apps/scandic-web/components/Sidebar/JoinLoyalty/Contact/ContactRow/index.tsx @@ -31,13 +31,9 @@ export default async function ContactRow({ contact }: ContactRowProps) { let Icon = null if (contact.contact_field.includes("email")) { - Icon = function MailIcon(props: MaterialIconSetIconProps) { - return - } + Icon = MailIcon } else if (contact.contact_field.includes("phone")) { - Icon = function PhoneIcone(props: MaterialIconSetIconProps) { - return - } + Icon = PhoneIcon } let openableLink = val @@ -66,3 +62,10 @@ export default async function ContactRow({ contact }: ContactRowProps) { ) } + +function PhoneIcon(props: MaterialIconSetIconProps) { + return +} +function MailIcon(props: MaterialIconSetIconProps) { + return +} diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities&Facilities/Cooling.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities&Facilities/Cooling.tsx index 8ca1e35f4..a860b88e1 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities&Facilities/Cooling.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities&Facilities/Cooling.tsx @@ -2,12 +2,7 @@ import { iconVariants } from '../../variants' import type { IconProps } from '../../icon' -export default function CoolingIcon({ - className, - color, - size, - ...props -}: IconProps) { +export default function CoolingIcon({ className, color, ...props }: IconProps) { const classNames = iconVariants({ className, color }) return ( , 'color'>, + Omit, 'color'> { + width?: string | number + height?: string | number +} + +export interface LogoProps extends Omit, 'color'>, VariantProps { width?: string | number diff --git a/packages/design-system/lib/components/Icons/index.tsx b/packages/design-system/lib/components/Icons/index.tsx index 1f1e06e18..af6632116 100644 --- a/packages/design-system/lib/components/Icons/index.tsx +++ b/packages/design-system/lib/components/Icons/index.tsx @@ -74,7 +74,7 @@ export { default as Popcorn2Icon } from './Nucleo/Food/popcorn-2' export type { IconProps, - LogoAndIllustrationProps, + IllustrationProps as LogoAndIllustrationProps, NucleoIconProps, } from './icon' export type {