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