refactor: Improve code formatting in ReadProgressBar
This commit is contained in:
parent
67c9732ee5
commit
6031b88792
@ -1,8 +1,7 @@
|
|||||||
import { createEffect, createSignal } from "solid-js";
|
import { createEffect, createSignal } from "solid-js";
|
||||||
|
|
||||||
export function ReadProgressBar() {
|
export function ReadProgressBar() {
|
||||||
const articleContentElement: HTMLElement | null =
|
const articleContentElement: HTMLElement | null = document.getElementById("article-content");
|
||||||
document.getElementById("article-content");
|
|
||||||
if (!articleContentElement) return null;
|
if (!articleContentElement) return null;
|
||||||
|
|
||||||
const [width, setWidth] = createSignal("0%");
|
const [width, setWidth] = createSignal("0%");
|
||||||
@ -38,14 +37,8 @@ export function ReadProgressBar() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div aria-hidden="true" class="fixed inset-x-0 bottom-0 lg:top-0 z-50 h-1 w-full bg-violet-50 pointer-events-none">
|
||||||
aria-hidden="true"
|
<div class="bg-violet-300 h-full transition-all duration-300 ease-out" style={{ width: width() }} />
|
||||||
class="fixed inset-x-0 bottom-0 lg:top-0 z-50 h-1 w-full bg-violet-50 pointer-events-none"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="bg-violet-300 h-full transition-all duration-300 ease-out"
|
|
||||||
style={{ width: width() }}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user