fix(ui): handle missing version in simulator state
[e-mobility-charging-stations-simulator.git] / ui / web / src / components / buttons / ToggleButton.vue
index b1cab90c6154867d47dcdd23598c79464e9aefea..6d72ba10f04a3e874f63b4757b11d14dbc2ee112 100644 (file)
@@ -15,15 +15,13 @@ const props = defineProps<{
   shared?: boolean
   on?: () => void
   off?: () => void
-  onStyle?: string
-  offStyle?: string
 }>()
 
 const $emit = defineEmits(['clicked'])
 
 const id = props.shared === true ? `shared-toggle-button-${props.id}` : `toggle-button-${props.id}`
 
-const state = ref({
+const state = ref<{ status: boolean }>({
   status: getFromLocalStorage<boolean>(id, props.status ?? false)
 })
 
@@ -50,5 +48,6 @@ const click = (): void => {
 <style>
 .on {
   background-color: lightgrey;
+  border-style: inset;
 }
 </style>