feat(ui): use toggle button to star/stop simulator
[e-mobility-charging-stations-simulator.git] / ui / web / src / components / buttons / ToggleButton.vue
index dd1805ca11a1e43dde08d3bb726a018177f88b29..b1cab90c6154867d47dcdd23598c79464e9aefea 100644 (file)
@@ -15,6 +15,8 @@ const props = defineProps<{
   shared?: boolean
   on?: () => void
   off?: () => void
+  onStyle?: string
+  offStyle?: string
 }>()
 
 const $emit = defineEmits(['clicked'])
@@ -26,7 +28,7 @@ const state = ref({
 })
 
 const click = (): void => {
-  if (props.shared) {
+  if (props.shared === true) {
     for (const key in localStorage) {
       if (key !== id && key.startsWith('shared-toggle-button-')) {
         setToLocalStorage<boolean>(key, false)