-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(status-page): gas price should use l2provider, add descriptions a…
…nd tooltips (#12490) * gas price should use l2provider * tooltips
- Loading branch information
1 parent
44f332d
commit cd34714
Showing
5 changed files
with
126 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<script lang="ts"> | ||
export let title: string = null; | ||
export let isOpen: boolean = false; | ||
export let onClose: () => void = null; | ||
export let showXButton: boolean = true; | ||
const onCloseClicked = () => { | ||
isOpen = false; | ||
if (onClose) { | ||
onClose(); | ||
} | ||
}; | ||
</script> | ||
|
||
<svelte:window | ||
on:keydown={function (e) { | ||
if (e.key === "Escape") { | ||
onCloseClicked(); | ||
} | ||
}} | ||
/> | ||
|
||
<div class="modal bg-black/60" class:modal-open={isOpen}> | ||
<div class="modal-box bg-dark-3"> | ||
<h3 class="font-bold text-lg text-center mt-4">{title}</h3> | ||
{#if showXButton} | ||
<div class="modal-action mt-0"> | ||
<button | ||
type="button" | ||
class="btn btn-sm btn-circle absolute right-2 top-2 cursor-pointer font-sans text-lg" | ||
on:click={onCloseClicked} | ||
> | ||
× | ||
</button> | ||
</div> | ||
{/if} | ||
<div class="modal-body"> | ||
<slot /> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.modal { | ||
align-items: center; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script lang="ts"> | ||
import { QuestionMarkCircle } from "svelte-heros-v2"; | ||
export let isOpen: boolean = false; | ||
</script> | ||
|
||
<QuestionMarkCircle | ||
on:click={() => (isOpen = true)} | ||
size="18" | ||
variation="outline" | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script lang="ts"> | ||
import Modal from "./Modal.svelte"; | ||
export let title: string; | ||
export let isOpen: boolean = false; | ||
</script> | ||
|
||
<Modal {title} bind:isOpen> | ||
<div class="flex h-full min-h-tooltip-modal w-full flex-col justify-between"> | ||
<div class="tip-body mb-4 flex-auto"> | ||
<slot name="body" /> | ||
</div> | ||
<div class="tip-footer self-start"> | ||
<slot name="footer" /> | ||
</div> | ||
</div> | ||
</Modal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters