Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #13

Merged
merged 5 commits into from
Apr 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updates
gesseekur committed Apr 16, 2020
commit b6227cf6036c345f623dd178918b94edc96ba5ee
8 changes: 8 additions & 0 deletions src/assets/styles/basics/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* {
color: var(--v-info-base);
}

html,
body {
font-family: "Roboto", sans-serif;
}
3 changes: 3 additions & 0 deletions src/assets/styles/basics/_input.scss
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@
}

.v-input {
input {
color: var(--v-info-base) !important;
}
.v-label {
color: var(--v-input-label-base);
font-weight: 500;
1 change: 1 addition & 0 deletions src/assets/styles/global.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import "setup/_typography.min.scss";

@import "basics/_base.scss";
@import "basics/_input.scss";
@import "basics/_button.scss";

41 changes: 40 additions & 1 deletion src/components/AddressSelect/AddressSelect.vue
Original file line number Diff line number Diff line change
@@ -4,9 +4,11 @@
class="address-select"
v-model="addressValue"
:items="items"
item-text="address"
item-value="address"
:label="label"
:placeholder="placeholder"
:menu-props="{ value: autoSelectMenu }"
:menu-props="{ value: autoSelectMenu, closeOnClick: true }"
ref="addressInput"
outlined
>
@@ -35,6 +37,15 @@
<div class="border" />
<v-icon @click="toggle">mdi-chevron-down</v-icon>
</template>

<template v-slot:item="data">
<div class="item-container" @click="selectAddress(data.item)">
<div class="address-container">
<div class="address">{{ data.item.address }}</div>
</div>
<div class="nickname">{{ data.item.nickname }}</div>
</div>
</template>
</v-combobox>
</div>
</template>
@@ -103,13 +114,38 @@ export default {
document.execCommand("copy");
console.log("copied");
// Toast.responseHandler(this.$t('common.copied'), Toast.INFO);
},
selectAddress(data) {
this.autoSelectMenu = false;
this.addressValue = data.address;
console.error('addr', this.addressValue)
}
}
};
</script>

<style lang="scss" scoped>
.v-application {
.item-container {
align-items: center;
display: flex;
justify-content: space-between;
width: 100%;
.address-container {
.address {
color: var(--v-basic-base);
}
}
.nickname {
font-size: 10px;
font-weight: 700;
text-align: right;
color: var(--v-primary-base);
}
}
.address-select {
.blockie-placeholder {
height: 30px;
@@ -136,6 +172,9 @@ export default {
img {
cursor: pointer;
&:hover {
opacity: 0.5;
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions stories/AddressSelector/AddressSelector.stories.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
withKnobs,
text,
array,
files
} from "@storybook/addon-knobs";
import { withKnobs, text, array } from "@storybook/addon-knobs";
import mewAddressSelector from "@/components/AddressSelect/AddressSelect.vue";

export default {
@@ -15,8 +10,13 @@ export default {
};

const addressesArray = [
"Hello"
]
{
address: "123",
currency: "ETH",
nickname: "nickname",
resolverAddr: "123"
}
];

export const AddressSelector = () => ({
components: { "address-selector": mewAddressSelector },
10 changes: 0 additions & 10 deletions vue.config.js

This file was deleted.