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.

19 lines
618 B

import { MarkerProps } from './types';
export const MarkerComponent = ({ marker, isFirst, isLast }: MarkerProps) => {
return (
<li key={marker.key}>
{`Waypoint ${marker.label} (${marker.key.substring(0, 4)})`}
<span class="buttons">
<button onClick={marker.moveUp} disabled={isFirst}>
🔼
</button>
<button onClick={marker.moveDown} disabled={isLast}>
🔽
</button>
<button onClick={marker.remove}>🗑</button>
</span>
</li>
);
};