Small preact-based (like React.js) project
https://inga-lovinde.github.io/static/komoot-demo/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1008 B
46 lines
1008 B
import type { Coordinates, Waypoint } from '../shared/types';
|
|
|
|
export type Marker = Waypoint & {
|
|
key: string;
|
|
remove: () => void;
|
|
moveUp: () => void;
|
|
moveDown: () => void;
|
|
changeLongLabel: (newLongLabel: string) => void;
|
|
/**
|
|
* Should be at most 1-2 characters (to be displayed on map markers), can change at any time
|
|
*/
|
|
shortLabel: string;
|
|
/**
|
|
* Displayed in the list, should only change when explicitly requested by user
|
|
*/
|
|
longLabel: string;
|
|
};
|
|
|
|
export type ReorderListParams = {
|
|
oldIndex: number;
|
|
newIndex: number;
|
|
};
|
|
|
|
export type MarkersProps = {
|
|
markers: Marker[];
|
|
onMarkersReorder: (params: ReorderListParams) => void;
|
|
};
|
|
|
|
export type TotalProps = {
|
|
markers: Marker[];
|
|
};
|
|
|
|
export type MapProps = {
|
|
markers: Marker[];
|
|
onMapClick: (coordinates: Coordinates) => void;
|
|
};
|
|
|
|
export type ExportProps = {
|
|
markers: Marker[];
|
|
};
|
|
|
|
export type MarkerProps = {
|
|
marker: Marker;
|
|
isFirst: boolean;
|
|
isLast: boolean;
|
|
};
|
|
|