-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from cosmology-tech/fix/improvements-bugfix
fix(vue): package distribution bundle exports
- Loading branch information
Showing
14 changed files
with
22,081 additions
and
21,405 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
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,42 +1,80 @@ | ||
<script setup lang="ts"> | ||
import { ModalsContainer, useModal } from 'vue-final-modal'; | ||
import { Box } from '@interchain-ui/vue' | ||
import ModalView from './modal/modal.vue'; | ||
import VButton from './v-button.vue'; | ||
const { open, close } = useModal({ | ||
component: ModalView, | ||
attrs: { | ||
}, | ||
slots: { | ||
default: '<p>The content of the modal</p>', | ||
}, | ||
}) | ||
import { ref } from "vue"; | ||
import { | ||
Box, | ||
Modal, | ||
Button, | ||
ConnectModalQrcode, | ||
ConnectModalHead, | ||
ConnectModalWalletList, | ||
} from "@interchain-ui/vue"; | ||
import { | ||
wallets, | ||
qrCodeProps, | ||
WalletPluginSystem, | ||
} from "../data/connect-wallet-data"; | ||
function convert(ws: typeof wallets) { | ||
return ws.map((wallet) => ({ | ||
...wallet, | ||
logo: wallet.extends | ||
? WalletPluginSystem[wallet.extends].logo | ||
: wallet.logo, | ||
badge: wallet.extends ? WalletPluginSystem[wallet.extends].text : undefined, | ||
btmLogo: wallet.extends ? wallet.logo : undefined, | ||
})); | ||
} | ||
const isOpen = ref(false); | ||
const hasBack = ref(false); | ||
function onClose() { | ||
isOpen.value = false; | ||
hasBack.value = false; | ||
} | ||
function onBack() { | ||
hasBack.value = false; | ||
} | ||
function onNext() { | ||
hasBack.value = true; | ||
} | ||
const convertedWallets = convert(wallets); | ||
</script> | ||
|
||
<template> | ||
<div class="flex w-[100vw] h-[100vh]"> | ||
<div class="flex flex-col gap-4 text-center mx-auto my-0 pt-[300px]"> | ||
<p>Vite + Vue + @interchain-ui/vue demo</p> | ||
|
||
<Box color="$blue400" bg="$cardBg" padding="$4"> | ||
Hello Boxy box | ||
</Box> | ||
<Box color="$blue400" bg="$cardBg" padding="$4"> Hello Boxy box </Box> | ||
|
||
<VButton @click="open"> | ||
<Button @click="isOpen = true"> | ||
<span class="flex justify-center items-center"> | ||
Open Modal | ||
Open Connect Modal | ||
</span> | ||
</VButton> | ||
|
||
<VButton @click="close"> | ||
<span class="flex justify-center items-center"> | ||
Close Modal | ||
</span> | ||
</VButton> | ||
</Button> | ||
</div> | ||
</div> | ||
|
||
|
||
<ModalsContainer /> | ||
<Modal :is-open="isOpen" @close="onClose"> | ||
<template #header="{ closeButtonProps }"> | ||
<ConnectModalHead | ||
title="Connect Wallet" | ||
:hasCloseButton="true" | ||
:hasBackButton="hasBack" | ||
@back="onBack" | ||
:closeButtonProps="closeButtonProps" | ||
/> | ||
</template> | ||
<ConnectModalQrcode v-if="hasBack" v-bind="qrCodeProps" /> | ||
<ConnectModalWalletList | ||
v-else | ||
:wallets="convertedWallets" | ||
@wallet-item-click="onNext" | ||
/> | ||
</Modal> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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.