Skip to content

Commit 32ce402

Browse files
committed
refactor to use checkbox
1 parent 16f3618 commit 32ce402

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

packages/viewer/src/components/Dev/Explore.svelte

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
const { spaces, properties, theorems, traits } = context()
88

9-
let showRedundancy = defaultStorage.getItem('showRedundancy') != null
9+
let showRedundancy = defaultStorage.getItem('showRedundancy') !== null
1010
$: showRedundancy
11-
? defaultStorage.setItem('showRedundancy', '')
11+
? defaultStorage.setItem('showRedundancy', 'show')
1212
: defaultStorage.removeItem('showRedundancy')
1313
</script>
1414

@@ -40,14 +40,16 @@
4040
<button type="button" class="btn btn-outline-dark" on:click={reset}>
4141
Reset
4242
</button>
43-
<button
44-
type="button"
45-
class="btn btn-outline-dark"
46-
class:btn-info={showRedundancy}
47-
on:click={() => (showRedundancy = !showRedundancy)}
48-
>
49-
{showRedundancy ? 'Show redundancy' : 'Hide redundancy'}
50-
</button>
43+
</td>
44+
</tr>
45+
<tr>
46+
<td colspan="2">
47+
<input
48+
id="redundancyCheckbox"
49+
type="checkbox"
50+
bind:checked={showRedundancy}
51+
/>
52+
<label for="redundancyCheckbox"> Show redundancies in tables </label>
5153
</td>
5254
</tr>
5355
</tbody>

0 commit comments

Comments
 (0)