From 24e8c984d86791d73098a2be4c2af68675dbd4a6 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 22 Aug 2023 19:42:06 +0200 Subject: [PATCH] some css --- .../Map/Subcomponents/ItemFormPopup.tsx | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Components/Map/Subcomponents/ItemFormPopup.tsx b/src/Components/Map/Subcomponents/ItemFormPopup.tsx index a9b3ea9b..906f19f6 100644 --- a/src/Components/Map/Subcomponents/ItemFormPopup.tsx +++ b/src/Components/Map/Subcomponents/ItemFormPopup.tsx @@ -4,8 +4,8 @@ import { Popup as LeafletPopup, useMap } from 'react-leaflet' import { useEffect, useRef, useState } from 'react' import { useAddItem, useUpdateItem } from '../hooks/useItems' import { Geometry, LayerProps, Item, ItemsApi } from '../../../types' -import {TextAreaInput} from '../../Input/TextAreaInput' -import {TextInput} from '../../Input/TextInput' +import { TextAreaInput } from '../../Input/TextAreaInput' +import { TextInput } from '../../Input/TextInput' export interface ItemFormPopupProps { position: LatLng, @@ -76,25 +76,28 @@ export function ItemFormPopup(props: ItemFormPopupProps) { { - setTimeout(function() { + setTimeout(function () { resetPopup() - - }, 100); + + }, 100); } }} position={props.position}>
handleSubmit(e)}> -
New {props.layer.name}
- + {props.item ?
+ : +
New {props.layer.name}
+ } + - {props.children ? + {props.children ? - React.Children.toArray(props.children).map((child) => + React.Children.toArray(props.children).map((child) => React.isValidElement<{ item: Item, test: string }>(child) ? - React.cloneElement(child, { item: props.item}) : "" + React.cloneElement(child, { item: props.item }) : "" ) - : + : <>