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)
})
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)
<style>
.on {
background-color: lightgrey;
+ border-style: inset;
}
</style>