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,12 +1,12 @@
|
||||
import { IconByIconName } from '../../../Icons/IconByIconName'
|
||||
import { IconByIconName } from "../../../Icons/IconByIconName"
|
||||
|
||||
import {
|
||||
getIconByPoiGroupAndCategory,
|
||||
type PointOfInterestGroup,
|
||||
} from '../utils'
|
||||
import { poiVariants } from './variants'
|
||||
} from "../utils"
|
||||
import { poiVariants } from "./variants"
|
||||
|
||||
import type { VariantProps } from 'class-variance-authority'
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
|
||||
interface PoiMarkerProps extends VariantProps<typeof poiVariants> {
|
||||
group: PointOfInterestGroup
|
||||
@@ -18,8 +18,8 @@ export function PoiMarker({
|
||||
group,
|
||||
categoryName,
|
||||
skipBackground,
|
||||
size = 'small',
|
||||
className = '',
|
||||
size = "small",
|
||||
className = "",
|
||||
}: PoiMarkerProps) {
|
||||
const iconName = getIconByPoiGroupAndCategory(group, categoryName)
|
||||
const classNames = poiVariants({ group, skipBackground, size, className })
|
||||
@@ -28,8 +28,8 @@ export function PoiMarker({
|
||||
<span className={classNames}>
|
||||
<IconByIconName
|
||||
iconName={iconName}
|
||||
color={skipBackground ? 'CurrentColor' : 'Icon/Inverted'}
|
||||
size={size === 'small' ? 16 : size === 'large' ? 24 : 20}
|
||||
color={skipBackground ? "CurrentColor" : "Icon/Inverted"}
|
||||
size={size === "small" ? 16 : size === "large" ? 24 : 20}
|
||||
/>
|
||||
</span>
|
||||
) : null
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import { cva } from 'class-variance-authority'
|
||||
import { cva } from "class-variance-authority"
|
||||
|
||||
import type { PointOfInterestGroup } from '../utils'
|
||||
import styles from './poiMarker.module.css'
|
||||
import type { PointOfInterestGroup } from "../utils"
|
||||
import styles from "./poiMarker.module.css"
|
||||
|
||||
export const poiVariants = cva(styles.poiMarker, {
|
||||
variants: {
|
||||
group: {
|
||||
['Attractions']: styles.attractions,
|
||||
['Business']: styles.business,
|
||||
['Location']: styles.location,
|
||||
['Parking']: styles.parking,
|
||||
['Public transport']: styles.publicTransport,
|
||||
['Shopping & Dining']: styles.shoppingDining,
|
||||
["Attractions"]: styles.attractions,
|
||||
["Business"]: styles.business,
|
||||
["Location"]: styles.location,
|
||||
["Parking"]: styles.parking,
|
||||
["Public transport"]: styles.publicTransport,
|
||||
["Shopping & Dining"]: styles.shoppingDining,
|
||||
} satisfies Record<PointOfInterestGroup, string>,
|
||||
skipBackground: {
|
||||
true: styles.skipBackground,
|
||||
false: '',
|
||||
false: "",
|
||||
},
|
||||
size: {
|
||||
small: styles.small,
|
||||
@@ -25,6 +25,6 @@ export const poiVariants = cva(styles.poiMarker, {
|
||||
},
|
||||
defaultVariants: {
|
||||
skipBackground: false,
|
||||
size: 'small',
|
||||
size: "small",
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user