utopia-ui/src/Components/Map/LayerContext.ts
Max 82b1f39141
refactor(source): refactor Layer and its subcomponents, replacing cloneElement by context (#185)
* Refactor Layer and its subcomponents, replacing cloneElement by context

* Add showcase for PopupButton template component

* Templateify exported elements (WIP)

* Remove unused file

* Export templateified PopupStartEndInput

* Fix template component type

* Change folder structure

* Lower test coverage

* changed export name

* Refactor PopupForm and PopupView

* More refactoring

* Add provider for PopupFormContext

* Fix popupform title

* Add comments

* Use correct ItemFormPopup for new items

* Fix linting

* Reduce coverage

* Change tailwind prefix

* Fix type

---------

Co-authored-by: Anton Tranelis <mail@antontranelis.de>
Co-authored-by: Anton Tranelis <31516529+antontranelis@users.noreply.github.com>
2025-05-22 20:14:42 +02:00

23 lines
452 B
TypeScript

import { createContext } from 'react'
import type { MarkerIcon } from '#types/MarkerIcon'
interface LayerContextType {
name: string
markerDefaultColor: string
markerDefaultColor2: string
markerShape: string
menuText: string
markerIcon?: MarkerIcon
}
const LayerContext = createContext<LayerContextType>({
name: '',
markerDefaultColor: '',
markerDefaultColor2: '',
markerShape: '',
menuText: '',
})
export default LayerContext