mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
correct type import
This commit is contained in:
parent
3f4c50d34e
commit
5e3aca1959
@ -21,8 +21,8 @@ import { TabsForm } from './Templates/TabsForm'
|
||||
|
||||
import type { FormState } from '#types/FormState'
|
||||
import type { Item } from '#types/Item'
|
||||
import type { MarkerIcon } from '#types/MarkerIcon'
|
||||
import type { Tag } from '#types/Tag'
|
||||
import type { markerIcon } from '#utils/MarkerIconFactory'
|
||||
|
||||
/**
|
||||
* @category Profile
|
||||
@ -40,7 +40,7 @@ export function ProfileForm() {
|
||||
telephone: '',
|
||||
next_appointment: '',
|
||||
image: '',
|
||||
marker_icon: {} as markerIcon,
|
||||
marker_icon: {} as MarkerIcon,
|
||||
offers: [] as Tag[],
|
||||
needs: [] as Tag[],
|
||||
relations: [] as Item[],
|
||||
|
||||
@ -2,10 +2,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
import { divIcon, Point } from 'leaflet'
|
||||
|
||||
export interface markerIcon {
|
||||
image: string
|
||||
size?: number
|
||||
}
|
||||
import type { MarkerIcon } from '#types/MarkerIcon'
|
||||
|
||||
const createSvg = (shape: string, markerColor: string, borderColor: string) => {
|
||||
const svgMap = {
|
||||
@ -38,7 +35,7 @@ const MarkerIconFactory = (
|
||||
shape: string,
|
||||
color1: string,
|
||||
color2: string,
|
||||
icon?: markerIcon,
|
||||
icon?: MarkerIcon,
|
||||
assetsURL?: string,
|
||||
) => {
|
||||
if (icon && assetsURL)
|
||||
|
||||
4
src/types/Item.d.ts
vendored
4
src/types/Item.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
import type { markerIcon } from '#utils/MarkerIconFactory'
|
||||
import type { ItemsApi } from './ItemsApi'
|
||||
import type { LayerProps } from './LayerProps'
|
||||
import type { MarkerIcon } from './MarkerIcon'
|
||||
import type { Relation } from './Relation'
|
||||
import type { UserItem } from './UserItem'
|
||||
import type { Point } from 'geojson'
|
||||
@ -44,7 +44,7 @@ export interface Item {
|
||||
needs?: TagIds
|
||||
status?: string
|
||||
color?: string
|
||||
markerIcon?: markerIcon
|
||||
markerIcon?: MarkerIcon
|
||||
avatar?: string
|
||||
new?: boolean
|
||||
contact?: string
|
||||
|
||||
4
src/types/LayerProps.d.ts
vendored
4
src/types/LayerProps.d.ts
vendored
@ -1,8 +1,8 @@
|
||||
import type { markerIcon } from '#utils/MarkerIconFactory'
|
||||
import type { Item } from './Item'
|
||||
import type { ItemFormPopupProps } from './ItemFormPopupProps'
|
||||
import type { ItemsApi } from './ItemsApi'
|
||||
import type { ItemType } from './ItemType'
|
||||
import type { MarkerIcon } from './MarkerIcon'
|
||||
|
||||
/**
|
||||
* @category Types
|
||||
@ -15,7 +15,7 @@ export interface LayerProps {
|
||||
menuIcon: string
|
||||
menuColor: string
|
||||
menuText: string
|
||||
markerIcon: markerIcon
|
||||
markerIcon: MarkerIcon
|
||||
markerShape: string
|
||||
markerDefaultColor: string
|
||||
markerDefaultColor2?: string
|
||||
|
||||
4
src/types/MarkerIcon.d.ts
vendored
Normal file
4
src/types/MarkerIcon.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export interface MarkerIcon {
|
||||
image: string
|
||||
size?: number
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user