Merged in fix/lint-issues (pull request #1678)

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
This commit is contained in:
Anton Gunnarsson
2025-03-31 12:27:32 +00:00
parent 9d584887ad
commit 93aafe5525
37 changed files with 85 additions and 155 deletions

View File

@@ -31,13 +31,9 @@ export default async function ContactRow({ contact }: ContactRowProps) {
let Icon = null let Icon = null
if (contact.contact_field.includes("email")) { if (contact.contact_field.includes("email")) {
Icon = function MailIcon(props: MaterialIconSetIconProps) { Icon = MailIcon
return <MaterialIcon icon="mail" {...props} />
}
} else if (contact.contact_field.includes("phone")) { } else if (contact.contact_field.includes("phone")) {
Icon = function PhoneIcone(props: MaterialIconSetIconProps) { Icon = PhoneIcon
return <MaterialIcon icon="phone" {...props} />
}
} }
let openableLink = val let openableLink = val
@@ -66,3 +62,10 @@ export default async function ContactRow({ contact }: ContactRowProps) {
</div> </div>
) )
} }
function PhoneIcon(props: MaterialIconSetIconProps) {
return <MaterialIcon icon="phone" {...props} />
}
function MailIcon(props: MaterialIconSetIconProps) {
return <MaterialIcon icon="mail" {...props} />
}

View File

@@ -2,12 +2,7 @@ import { iconVariants } from '../../variants'
import type { IconProps } from '../../icon' import type { IconProps } from '../../icon'
export default function CoolingIcon({ export default function CoolingIcon({ className, color, ...props }: IconProps) {
className,
color,
size,
...props
}: IconProps) {
const classNames = iconVariants({ className, color }) const classNames = iconVariants({ className, color })
return ( return (
<svg <svg

View File

@@ -1,6 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedIcon({ color, ...props }: LogoAndIllustrationProps) { export default function BedIcon(props: IllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedBunkIcon({ export default function BedBunkIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedBunkExtraIcon({ export default function BedBunkExtraIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedGenericIcon({ export default function BedGenericIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedKingIcon({ export default function BedKingIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedPullOutIcon({ export default function BedPullOutIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedPullOutExtraIcon({ export default function BedPullOutExtraIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedQueenIcon({ export default function BedQueenIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedSingleIcon({ export default function BedSingleIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedSofaIcon({ export default function BedSofaIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedSofaExtraIcon({ export default function BedSofaExtraIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedTwinIcon({ export default function BedTwinIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function BedWallExtraIcon({ export default function BedWallExtraIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function CoinIcon({ export default function CoinIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function CroissantCoffeeEggIcon({ export default function CroissantCoffeeEggIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function CutleryOneIcon({ export default function CutleryOneIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function CutleryTwoIcon({ export default function CutleryTwoIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function GiftOpenIcon({ export default function GiftOpenIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function HandKeyIcon({ export default function HandKeyIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function HotelNightIcon({ export default function HotelNightIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function KidsIcon({ export default function KidsIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function KidsMocktailIcon({ export default function KidsMocktailIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function MagicWandIcon({ export default function MagicWandIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function MoneyHandIcon({ export default function MoneyHandIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function SurpriseIcon({ export default function SurpriseIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,9 +1,6 @@
import type { LogoAndIllustrationProps } from '../icon' import type { IllustrationProps } from '../icon'
export default function VoucherIcon({ export default function VoucherIcon(props: IllustrationProps) {
color,
...props
}: LogoAndIllustrationProps) {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"

View File

@@ -1,11 +1,11 @@
import type { LogoAndIllustrationProps } from '../icon' import type { LogoProps } from '../icon'
import { iconVariants } from '../variants' import { iconVariants } from '../variants'
export default function DowntownCamperIcon({ export default function DowntownCamperIcon({
className, className,
color, color,
...props ...props
}: LogoAndIllustrationProps) { }: LogoProps) {
const classNames = iconVariants({ className, color }) const classNames = iconVariants({ className, color })
return ( return (
<svg <svg

View File

@@ -1,12 +1,12 @@
import { iconVariants } from '../variants' import { iconVariants } from '../variants'
import type { LogoAndIllustrationProps } from '../icon' import type { LogoProps } from '../icon'
export default function GrandHotelOsloLogoIcon({ export default function GrandHotelOsloLogoIcon({
className, className,
color, color,
...props ...props
}: LogoAndIllustrationProps) { }: LogoProps) {
const classNames = iconVariants({ className, color }) const classNames = iconVariants({ className, color })
return ( return (
<svg <svg

View File

@@ -1,12 +1,12 @@
import { iconVariants } from '../variants' import { iconVariants } from '../variants'
import type { LogoAndIllustrationProps } from '../icon' import type { LogoProps } from '../icon'
export default function HaymarketIcon({ export default function HaymarketIcon({
className, className,
color, color,
...props ...props
}: LogoAndIllustrationProps) { }: LogoProps) {
const classNames = iconVariants({ className, color }) const classNames = iconVariants({ className, color })
return ( return (
<svg <svg

View File

@@ -1,12 +1,12 @@
import { iconVariants } from '../variants' import { iconVariants } from '../variants'
import type { LogoAndIllustrationProps } from '../icon' import type { LogoProps } from '../icon'
export default function HotelNorgeIcon({ export default function HotelNorgeIcon({
className, className,
color, color,
...props ...props
}: LogoAndIllustrationProps) { }: LogoProps) {
const classNames = iconVariants({ className, color }) const classNames = iconVariants({ className, color })
return ( return (
<svg <svg

View File

@@ -1,12 +1,12 @@
import { iconVariants } from '../variants' import { iconVariants } from '../variants'
import type { LogoAndIllustrationProps } from '../icon' import type { LogoProps } from '../icon'
export default function MarskiLogoIcon({ export default function MarskiLogoIcon({
className, className,
color, color,
...props ...props
}: LogoAndIllustrationProps) { }: LogoProps) {
const classNames = iconVariants({ className, color }) const classNames = iconVariants({ className, color })
return ( return (
<svg <svg

View File

@@ -1,12 +1,12 @@
import { iconVariants } from '../variants' import { iconVariants } from '../variants'
import type { LogoAndIllustrationProps } from '../icon' import type { LogoProps } from '../icon'
export default function ScandicGoLogoIcon({ export default function ScandicGoLogoIcon({
className, className,
color, color,
...props ...props
}: LogoAndIllustrationProps) { }: LogoProps) {
const classNames = iconVariants({ className, color }) const classNames = iconVariants({ className, color })
return ( return (
<svg <svg

View File

@@ -1,12 +1,12 @@
import { iconVariants } from '../variants' import { iconVariants } from '../variants'
import type { LogoAndIllustrationProps } from '../icon' import type { LogoProps } from '../icon'
export default function ScandicLogoIcon({ export default function ScandicLogoIcon({
className, className,
color, color,
...props ...props
}: LogoAndIllustrationProps) { }: LogoProps) {
const classNames = iconVariants({ className, color }) const classNames = iconVariants({ className, color })
return ( return (
<svg <svg

View File

@@ -7,7 +7,14 @@ export interface IconProps
size?: number size?: number
} }
export interface LogoAndIllustrationProps export interface IllustrationProps
extends Omit<React.SVGAttributes<HTMLOrSVGElement>, 'color'>,
Omit<VariantProps<typeof iconVariants>, 'color'> {
width?: string | number
height?: string | number
}
export interface LogoProps
extends Omit<React.SVGAttributes<HTMLOrSVGElement>, 'color'>, extends Omit<React.SVGAttributes<HTMLOrSVGElement>, 'color'>,
VariantProps<typeof iconVariants> { VariantProps<typeof iconVariants> {
width?: string | number width?: string | number

View File

@@ -74,7 +74,7 @@ export { default as Popcorn2Icon } from './Nucleo/Food/popcorn-2'
export type { export type {
IconProps, IconProps,
LogoAndIllustrationProps, IllustrationProps as LogoAndIllustrationProps,
NucleoIconProps, NucleoIconProps,
} from './icon' } from './icon'
export type { export type {