UNPKG

ocearo-ui

Version:

Ocean Robot UI: Sailing made smarter

1 lines 1.03 kB
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[353],{22353:function(t,e,a){a.r(e);var s=a(57437),l=a(53082);e.default=()=>{let{nightMode:t}=(0,l.yC)(),{getSignalKValue:e}=(0,l.yC)(),a=180*(e("steering.rudderAngle")||0)/Math.PI;return(0,s.jsx)("div",{style:{width:"480px",paddingBottom:"25px"},className:"mx-auto",children:(0,s.jsxs)("div",{className:"w-full bg-oGray h-1 rounded-full relative mt-2",children:[(()=>{let e=[];for(let a=-60;a<=60;a+=10){let l=a/120*100;e.push((0,s.jsx)("div",{className:"absolute h-2 w-px bg-oGray",style:{left:"".concat(50+l,"%"),transform:"translateX(-20%)"},children:(0,s.jsx)("span",{className:"text-xs ".concat(t?"text-oNight":"text-oGray"),style:{transform:"translateY(-50%)"},children:a})},a))}return e})()," ",(0,s.jsx)("div",{className:"absolute top-0 h-1 rounded-full transition-all duration-300 ease-in-out ".concat(a<0?"bg-oRed":"bg-oGreen"),style:{width:"".concat(Math.abs(a)/120*100,"%"),left:"50%",transform:a<0?"translateX(-100%)":"translateX(0)"}})]})})}}}]);