summaryrefslogblamecommitdiffstatshomepage
path: root/frontend/src/lib/reader/components/CloseReaderButton.svelte
blob: 0c88323e37c858b9069dcce5522b778cf12051ed (plain) (tree)


















                                                               
<script lang="ts">
	import { getReaderContext } from '$lib/Reader';
	import { accelerator } from '$lib/Shortcuts';

	const reader = getReaderContext();
</script>

<button
	type="button"
	class="btn floating"
	title="Close reader"
	on:click={() => {
		$reader.visible = false;
		$reader.sidebar = false;
	}}
	use:accelerator={'Escape'}
>
	<span class="icon-lg icon-[material-symbols--close]" />
</button>