Skip to content

Commit 2b44da3

Browse files
author
Jessica Peng
committedFeb 19, 2022
update mew select and mew table
1 parent 26f3dc1 commit 2b44da3

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed
 

‎src/components/MewSelect/MewSelect.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@
208208
}}</span></span>
209209
</div>
210210
<div class="d-flex justify-center flex-column align-end">
211-
<span>${{ data.item.totalBalance || data.item.price }}</span>
211+
<span>{{ data.item.priceSymbol || '$' }}{{ data.item.totalBalance || data.item.price }}</span>
212212
<span
213213
class="mew-caption font-weight-regular textSecondary--text"
214214
v-if="data.item.totalBalance"
215-
>@ ${{ data.item.price }}</span>
215+
>@ {{ data.item.priceSymbol || '$' }}{{ data.item.price }}</span>
216216
</div>
217217
</div>
218218
</div>

‎src/components/MewTable/MewTable.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
:src="item.tokenImg"
7171
:alt="item.token"
7272
>
73-
<span>{{ item.token }}</span>
73+
<span class="truncate">{{ item.token }}</span>
7474
</div>
7575
</template>
7676
<!--
@@ -282,6 +282,8 @@ export default {
282282
props: {
283283
/**
284284
* Applies skeleton loader
285+
* note: tableData has to be empty
286+
* for the prop to work correctly
285287
*/
286288
loading: {
287289
type: Boolean,

‎stories/MewTable/MewTable.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ The **hasColor** prop changes the tables background color to *superPrimary darke
1212
will add a checkbox to each row. The events **selectedAll** or **selectedRow** will be emitted with the item when
1313
the checkboxes are selected. There are different style customizations for the following values:
1414
toggle, txHash, token, change, balance, callToAction, and
15-
address. All you have to do is pass the value and attribute to **tableHeaders** and **tableData**.
15+
address. All you have to do is pass the value and attribute to **tableHeaders** and **tableData**. If you would like to
16+
utilize the skeleton loading state then you must pass the **loading** prop and you must pass an empty array
17+
to **tableData**.
1618

1719

1820
## Props

‎stories/MewTable/MewTable.stories.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export const MEWTable = () => ({
192192
:loading="loading"
193193
:has-color="hasColor"
194194
:has-select="hasSelect"
195-
:table-data="hasSelect ? tableSelectData : tableData"
195+
:table-data="loading ? [] : hasSelect ? tableSelectData : tableData"
196196
:table-headers="hasSelect ? tableSelectHeaders : tableHeaders"
197197
:no-data-text="noDataText"
198198
@selectedRow="onSelect"

0 commit comments

Comments
 (0)
Please sign in to comment.