Skip to content

Commit

Permalink
remove unecessary styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Polyakov committed Mar 13, 2024
1 parent 42416ed commit f03dd76
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 53 deletions.
6 changes: 3 additions & 3 deletions src/components/pages/Swap/Widget/Transactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
</div>
</template>
</s-table-column>
<s-table-column width="94">
<s-table-column>
<template #header>
<span>{{ tc('accountText', 1) }}</span>
</template>
<template v-slot="{ row }">
<formatted-address :value="row.address" :symbols="8" />
</template>
</s-table-column>
<s-table-column width="112" header-align="left" align="left">
<s-table-column header-align="left" align="left">
<template #header>
<span>{{ t('transfers.from') }}</span>
</template>
Expand All @@ -50,7 +50,7 @@
</div>
</template>
</s-table-column>
<s-table-column width="112" header-align="left" align="left">
<s-table-column header-align="left" align="left">
<template #header>
<span>{{ t('transfers.to') }}</span>
</template>
Expand Down
76 changes: 27 additions & 49 deletions src/components/shared/Widget/Grid/Grid.vue
Original file line number Diff line number Diff line change
@@ -1,50 +1,37 @@
<template>
<div class="grid-wrapper">
<grid-layout
:layout.sync="layout"
:responsive-layouts="responsiveLayouts"
:cols="cols"
:breakpoints="breakpoints"
:row-height="rowHeight"
:is-draggable="draggable"
:is-resizable="resizable"
:margin="[margin, margin]"
:responsive="true"
:prevent-collision="true"
:vertical-compact="compact"
:use-css-transforms="false"
@layout-ready="onReady"
@breakpoint-changed="onBreakpointChanged"
>
<grid-item
v-for="item in layout"
:key="item.i"
:i="item.i"
:x="item.x"
:y="item.y"
:w="item.w"
:h="item.h"
:min-h="item.minH"
:min-w="item.minW"
class="grid-item"
>
<slot
v-if="ready"
:name="item.i"
v-bind="{
onResize: ($event) => onWidgetResize($event, item.i),
}"
/>
</grid-item>
</grid-layout>
</div>
<grid-layout
:layout.sync="layout"
:responsive-layouts="responsiveLayouts"
:cols="cols"
:breakpoints="breakpoints"
:row-height="rowHeight"
:is-draggable="draggable"
:is-resizable="resizable"
:margin="[margin, margin]"
:responsive="true"
:prevent-collision="true"
:vertical-compact="compact"
:use-css-transforms="false"
@layout-ready="onReady"
@breakpoint-changed="onBreakpointChanged"
>
<grid-item v-for="widget in layout" :key="widget.i" v-bind="widget">
<slot
v-if="ready"
:name="widget.i"
v-bind="{
onResize: ($event) => onWidgetResize($event, widget.i),
}"
/>
</grid-item>
</grid-layout>
</template>

<script lang="ts">
import cloneDeep from 'lodash/fp/cloneDeep';
import debounce from 'lodash.debounce';
import { GridLayout, GridItem } from 'vue-grid-layout';
import { Component, Prop, Ref, Vue, Watch } from 'vue-property-decorator';
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
import { Breakpoint, BreakpointKey } from '@/consts/layout';
import type { Layout, LayoutConfig, LayoutWidget, LayoutWidgetConfig, ResponsiveLayouts } from '@/types/layout';
Expand Down Expand Up @@ -133,12 +120,3 @@ export default class WidgetsGrid extends Vue {
}
}
</script>

<style lang="scss">
.grid-wrapper {
.grid-item {
display: flex;
flex-flow: column nowrap;
}
}
</style>
2 changes: 1 addition & 1 deletion src/views/Swap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const LayoutsConfigDefault: ResponsiveLayouts<LayoutWidgetConfig> = {
{ x: 0, y: 0, w: 4, h: 20, i: SwapWidgets.Form },
{ x: 4, y: 0, w: 8, h: 20, i: SwapWidgets.Chart },
{ x: 0, y: 20, w: 4, h: 12, i: SwapWidgets.Distribution },
{ x: 4, y: 20, w: 6, h: 24, i: SwapWidgets.Transactions },
{ x: 4, y: 20, w: 8, h: 24, i: SwapWidgets.Transactions },
],
xs: [
{ x: 0, y: 0, w: 4, h: 20, i: SwapWidgets.Form },
Expand Down

0 comments on commit f03dd76

Please sign in to comment.