-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
147 additions
and
121 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,72 @@ | ||
<script lang="ts"> | ||
import { cn } from "$lib/utilities/shadcn.ts" | ||
import Search from "virtual:icons/lucide/search" | ||
import * as Dialog from "$lib/components/ui/dialog" | ||
import { Input } from "$lib/components/ui/input/index.js" | ||
import { Button } from "$lib/components/ui/button/index.js" | ||
export let dialogOpen = false | ||
export let handleAssetSearch: (event: InputEvent) => void | ||
export let handleAssetSelect: (asset: string) => void | ||
</script> | ||
|
||
<Dialog.Root | ||
closeOnEscape={true} | ||
preventScroll={true} | ||
bind:open={dialogOpen} | ||
closeOnOutsideClick={true} | ||
> | ||
<Dialog.Content | ||
class="max-w-[90%] sm:max-w-[400px] border-[1px] border-solid border-accent overflow-auto px-0 pt-3 pb-0 flex flex-col items-start rounded-md" | ||
> | ||
<Dialog.Header class="max-h-min h-8 p-2"> | ||
<Dialog.Title class="font-extrabold text-2xl pl-3 -mt-2">Select a token</Dialog.Title> | ||
</Dialog.Header> | ||
<Dialog.Description class="size-full"> | ||
<div class="relative mr-auto flex-1 w-full"> | ||
<Search class="absolute left-2.5 top-2.5 size-4 text-muted-foreground" /> | ||
<Input | ||
type="search" | ||
pattern="[a-z]" | ||
autocorrect="off" | ||
spellcheck="false" | ||
placeholder="OSMO…" | ||
autocapitalize="off" | ||
on:input={handleAssetSearch} | ||
class="w-full rounded-none bg-current/95 pl-8 self-stretch lowercase border-x-0 focus-visible:ring-0" | ||
/> | ||
</div> | ||
<ul class="my-3 mx-2 space-y-1"> | ||
<li | ||
class={cn([ | ||
// live ? 'cursor-pointer' : 'cursor-not-allowed', | ||
'pb-2 dark:text-accent-foreground flex flex-col h-full justify-start align-middle space-x-3.5', | ||
])} | ||
> | ||
<Button | ||
variant="ghost" | ||
class={cn([ | ||
'w-full flex justify-start space-x-4 p-2 rounded-none pl-3 h-[55px] my-auto', | ||
])} | ||
on:click={() => handleAssetSelect('osmo-test-1')} | ||
> | ||
<img | ||
alt={`osmosis logo`} | ||
class="size-10 my-auto mr-auto" | ||
src={'/images/icons/osmosis.svg'} | ||
/> | ||
<div class="size-full mr-auto flex flex-col items-start"> | ||
<span | ||
class="my-auto text-[22px] font-extrabold mr-auto w-full text-left justify-between text-foreground" | ||
> | ||
OSMO | ||
</span> | ||
<span class="text-xs text-muted-foreground">osmo-test-5</span> | ||
</div> | ||
<p class="mb-auto text-lg font-black">420.69</p> | ||
</Button> | ||
</li> | ||
</ul> | ||
</Dialog.Description> | ||
</Dialog.Content> | ||
</Dialog.Root> |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Chain from "./chain.svelte" | ||
import Settings from "./setttings.svelte" | ||
import Assets from "./assets.svelte" | ||
import Settings from "./settings.svelte" | ||
|
||
export { Chain as ChinDialog, Settings as SettingsDialog } | ||
export { Chain as ChainDialog, Settings as SettingsDialog, Assets as AssetsDialog } |
3 changes: 0 additions & 3 deletions
3
.../components/send/dialogs/setttings.svelte → ...b/components/send/dialogs/settings.svelte
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
Oops, something went wrong.