Skip to content

Commit 167cbc9

Browse files
committed
Updated styles
1 parent 4491fa5 commit 167cbc9

File tree

3 files changed

+36
-147
lines changed

3 files changed

+36
-147
lines changed
Lines changed: 11 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,153 +1,37 @@
1-
.header {
2-
display: flex;
3-
align-items: flex-start;
4-
justify-content: space-between;
5-
align-self: stretch;
6-
flex-wrap: nowrap;
7-
flex-shrink: 0;
8-
position: relative;
9-
min-width: 0;
10-
padding: 24px 24px 12px 24px;
11-
}
12-
13-
.frame {
14-
display: flex;
15-
align-items: center;
16-
justify-content: flex-end;
17-
flex-wrap: nowrap;
18-
flex-shrink: 0;
19-
position: relative;
20-
width: 30px;
21-
height: 30px;
22-
padding: 0 0 0 0;
23-
}
24-
25-
.frame-1 {
26-
display: flex;
27-
flex-direction: column;
28-
align-items: center;
29-
flex-wrap: nowrap;
30-
flex-grow: 1;
31-
flex-shrink: 0;
32-
flex-basis: 0;
33-
gap: 4px;
34-
position: relative;
35-
}
36-
37-
.frame-2 {
38-
display: flex;
39-
align-items: center;
40-
justify-content: flex-end;
41-
flex-wrap: nowrap;
42-
flex-shrink: 0;
43-
position: relative;
44-
width: 30px;
45-
}
46-
47-
.mx-icon {
48-
display: flex;
49-
align-items: center;
50-
justify-content: center;
51-
flex-wrap: nowrap;
52-
flex-shrink: 0;
53-
position: relative;
54-
width: 30px;
55-
height: 30px;
56-
}
57-
58-
.transaction-navigation {
59-
display: flex;
60-
align-items: flex-start;
61-
justify-content: center;
62-
align-self: stretch;
63-
flex-wrap: nowrap;
64-
flex-shrink: 0;
65-
gap: 10px;
66-
position: relative;
67-
min-width: 0;
68-
padding: 0 24px 0 24px;
69-
}
70-
71-
.navigation-icon {
72-
display: flex;
73-
align-items: center;
74-
justify-content: center;
75-
flex-wrap: nowrap;
76-
flex-shrink: 0;
77-
position: relative;
78-
width: 25px;
79-
height: 25px;
80-
}
81-
82-
.sign-transaction-content {
83-
@apply mvx:flex mvx:flex-col mvx:items-center mvx:gap-2 mvx:relative mvx:min-w-0 mvx:self-stretch mvx:flex-nowrap mvx:shrink-0;
84-
85-
.sign-transactions-tabs {
86-
@apply mvx:px-4 mvx:gap-2 mvx:flex mvx:mr-auto;
87-
88-
.sign-transactions-tab {
89-
@apply mvx:px-4 mvx:h-8 mvx:flex mvx:items-center mvx:leading-none mvx:justify-center mvx:transition-all mvx:duration-200;
90-
@apply mvx:ease-in-out mvx:cursor-pointer mvx:relative mvx:rounded-3xl;
91-
color: var(--mvx-text-color-secondary);
92-
93-
&:hover,
94-
&.active {
95-
color: var(--mvx-text-accent-color);
96-
background-color: var(--mvx-bg-color-secondary);
97-
}
98-
99-
.sign-transactions-tab-text {
100-
@apply mvx:text-base mvx:z-1 mvx:relative mvx:capitalize;
101-
}
102-
}
103-
}
104-
}
105-
106-
@media (max-width: 480px) {
107-
.main-container {
108-
width: 100%;
109-
margin: 0;
110-
}
111-
}
112-
113-
.sign-transactions-panel {
114-
@apply mvx:flex mvx:flex-col mvx:flex-1 mvx:pb-6;
115-
}
116-
117-
// Trim component base styles
1+
// This is needed to trigger the Stecil Tailwind compilation for inline Tailwind classes.
1182
.trim {
119-
@apply mvx:flex mvx:relative mvx:max-w-full mvx:overflow-hidden mvx:whitespace-nowrap;
3+
@apply mvx:flex mvx:relative mvx:max-w-full mvx:overflow-hidden mvx:whitespace-nowrap;
1204
}
1215

1226
.trim-full {
123-
@apply mvx:text-transparent mvx:absolute mvx:leading-5;
7+
@apply mvx:text-transparent mvx:absolute mvx:leading-5;
1248
}
1259

12610
.trim-full-visible {
127-
@apply mvx:text-inherit mvx:relative mvx:leading-5;
11+
@apply mvx:text-inherit mvx:relative mvx:leading-5;
12812
}
12913

13014
.trim-wrapper {
131-
@apply mvx:hidden;
15+
@apply mvx:hidden;
13216
}
13317

13418
.trim-wrapper-visible {
135-
@apply mvx:overflow-hidden mvx:max-w-full mvx:flex;
19+
@apply mvx:overflow-hidden mvx:max-w-full mvx:flex;
13620
}
13721

13822
.trim-left-wrapper {
139-
@apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:text-left mvx:text-[1px];
23+
@apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:text-left mvx:text-[1px];
14024
}
14125

14226
.trim-left {
143-
@apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5;
27+
@apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5;
14428
}
14529

14630
.trim-right-wrapper {
147-
@apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:whitespace-nowrap mvx:text-right mvx:text-[1px];
148-
direction: rtl;
31+
@apply mvx:flex-shrink mvx:text-ellipsis mvx:overflow-hidden mvx:whitespace-nowrap mvx:text-right mvx:text-[1px];
32+
direction: rtl;
14933
}
15034

15135
.trim-right {
152-
@apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5 mvx:text-clip;
36+
@apply mvx:select-none mvx:pointer-events-none mvx:inline mvx:text-base mvx:leading-5 mvx:text-clip;
15337
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// prettier-ignore
2+
export default {
3+
signTransactionContent: 'sign-transaction-content mvx:flex mvx:flex-col mvx:items-center mvx:gap-2 mvx:relative mvx:min-w-0 mvx:self-stretch mvx:flex-nowrap mvx:shrink-0',
4+
signTransactionsTabs: 'sign-transactions-tabs mvx:px-4 mvx:gap-2 mvx:flex mvx:mr-auto',
5+
signTransactionsTab: 'sign-transactions-tab mvx:px-4 mvx:h-8 mvx:flex mvx:items-center mvx:leading-none mvx:justify-center mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:cursor-pointer mvx:relative mvx:rounded-3xl mvx:text-secondary-text mvx:hover:text-accent mvx:hover:bg-secondary mvx:active:text-accent mvx:active:bg-secondary',
6+
signTransactionsTabActive: 'sign-transactions-tab-active mvx:text-accent mvx:bg-secondary',
7+
signTransactionsTabText: 'sign-transactions-tab-text mvx:text-base mvx:z-1 mvx:relative mvx:capitalize',
8+
signTransactionsPanel: 'sign-transactions-panel mvx:flex mvx:flex-col mvx:flex-1 mvx:pb-6',
9+
button: 'button mvx:flex mvx:items-center mvx:justify-center mvx:font-bold mvx:leading-none mvx:px-4 mvx:max-h-full mvx:rounded-xl mvx:cursor-pointer mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:gap-2',
10+
buttonLarge: 'button-large mvx:h-12 mvx:text-base mvx:px-6',
11+
buttonSmall: 'button-small mvx:h-10 mvx:text-xs mvx:rounded-xl',
12+
buttonPrimary: 'button-primary mvx:text-button-primary mvx:bg-button-bg-primary mvx:border mvx:border-button-bg-primary',
13+
buttonSecondary: 'button-secondary mvx:relative mvx:text-button-secondary mvx:border mvx:border-transparent mvx:after:absolute mvx:after:inset-0 mvx:after:rounded-lg mvx:after:opacity-40 mvx:after:transition-all mvx:after:duration-200 mvx:after:ease-in-out mvx:after:bg-button-bg-secondary mvx:after:content-[""] mvx:after:-z-1 mvx:hover:opacity-100 mvx:hover:text-button-primary mvx:hover:after:opacity-100 mvx:hover:after:bg-button-bg-primary',
14+
buttonSecondarySmall: 'button-secondary-small mvx:after:rounded-xl',
15+
buttonNeutral: 'button-neutral mvx:text-neutral-925 mvx:bg-white mvx:hover:opacity-75',
16+
buttonDisabled: 'button-disabled mvx:pointer-events-none mvx:bg-transparent mvx:cursor-default mvx:border mvx:border-secondary-text mvx:!text-secondary-text mvx:hover:opacity-100',
17+
tooltipContent: 'tooltip-content mvx:flex-row mvx:cursor-default mvx:p-2 mvx:whitespace-nowrap mvx:text-xs mvx:rounded-xl mvx:leading-none mvx:!bg-surface mvx:border-outline-variant mvx:border mvx:text-primary mvx:after:left-1/2 mvx:after:origin-center mvx:after:w-2 mvx:after:h-2 mvx:after:absolute mvx:after:border mvx:after:border-outline-variant mvx:after:!bg-surface mvx:after:translate-x-[calc(50%-8px)] mvx:after:-rotate-[45deg] mvx:after:content-[""]',
18+
} satisfies Record<string, string>;

src/components/functional/sign-transactions-panel/sign-transactions-panel.tsx

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,7 @@ import { SignTransactionsOverview } from './components/SignTransactionsOverview/
1414
import { SignTransactionsAdvanced } from './components/SignTransactionsAdvanced/SignTransactionsAdvanced';
1515
import { SignTransactionsHeader } from './components/SignTransactionsHeader/SignTransactionsHeader';
1616

17-
// prettier-ignore
18-
const styles = {
19-
button: 'button mvx:flex mvx:items-center mvx:justify-center mvx:font-bold mvx:leading-none mvx:px-4 mvx:max-h-full mvx:rounded-xl mvx:cursor-pointer mvx:transition-all mvx:duration-200 mvx:ease-in-out mvx:gap-2',
20-
buttonLarge: 'button-large mvx:h-12 mvx:text-base mvx:px-6',
21-
buttonSmall: 'button-small mvx:h-10 mvx:text-xs mvx:rounded-xl',
22-
buttonPrimary: 'button-primary mvx:text-button-primary mvx:bg-button-bg-primary mvx:border mvx:border-button-bg-primary',
23-
buttonSecondary: 'button-secondary mvx:relative mvx:text-button-secondary mvx:border mvx:border-transparent mvx:after:absolute mvx:after:inset-0 mvx:after:rounded-lg mvx:after:opacity-40 mvx:after:transition-all mvx:after:duration-200 mvx:after:ease-in-out mvx:after:bg-button-bg-secondary mvx:after:content-[""] mvx:after:-z-1 mvx:hover:opacity-100 mvx:hover:text-button-primary mvx:hover:after:opacity-100 mvx:hover:after:bg-button-bg-primary',
24-
buttonSecondarySmall: 'button-secondary-small mvx:after:rounded-xl',
25-
buttonNeutral: 'button-neutral mvx:text-neutral-925 mvx:bg-white mvx:hover:opacity-75',
26-
buttonDisabled: 'button-disabled mvx:pointer-events-none mvx:bg-transparent mvx:cursor-default mvx:border mvx:border-secondary-text mvx:!text-secondary-text mvx:hover:opacity-100',
27-
// tooltipContent: 'tooltip-content mvx:flex-row mvx:cursor-default mvx:p-2 mvx:whitespace-nowrap mvx:text-xs mvx:rounded-xl mvx:leading-none mvx:!bg-surface mvx:border-outline-variant mvx:border mvx:text-primary mvx:after:left-1/2 mvx:after:origin-center mvx:after:w-2 mvx:after:h-2 mvx:after:absolute mvx:after:border mvx:after:border-outline-variant mvx:after:!bg-surface mvx:after:translate-x-[calc(50%-8px)] mvx:after:-rotate-[45deg] mvx:after:content-[""]',
28-
// signTransactionsHeader: 'sign-transactions-header mvx:flex mvx:flex-1 mvx:flex-col mvx:gap-5 mvx:py-5',
29-
} satisfies Record<string, string>;
17+
import styles from './sign-transactions-panel.styles';
3018

3119
@Component({
3220
tag: 'mvx-sign-transactions-panel',
@@ -155,7 +143,6 @@ export class SignTransactionsPanel {
155143
};
156144

157145
render() {
158-
console.log(styles) //TODO: remove this
159146
const transactionTabs = Object.values(TransactionTabsEnum);
160147

161148
const { commonData, onBack, onNext } = state;
@@ -168,7 +155,7 @@ export class SignTransactionsPanel {
168155
panelTitle="Confirm Transaction"
169156
hasBackButton={false}
170157
>
171-
<div class="sign-transactions-panel" data-testid={DataTestIdsEnum.signTransactionsPanel}>
158+
<div class={styles.signTransactionsPanel} data-testid={DataTestIdsEnum.signTransactionsPanel}>
172159
<SignTransactionsHeader
173160
onBack={onBack}
174161
onNext={onNext}
@@ -178,15 +165,15 @@ export class SignTransactionsPanel {
178165
showFavicon={this.showFavicon}
179166
/>
180167

181-
<div class="sign-transaction-content">
182-
<div class="sign-transactions-tabs">
168+
<div class={styles.signTransactionContent}>
169+
<div class={styles.signTransactionsTabs}>
183170
{transactionTabs.map(transactionTab => (
184171
<div
185-
class={{ 'sign-transactions-tab': true, 'active': transactionTab === this.activeTab }}
172+
class={{ [styles.signTransactionsTab]: true, [styles.signTransactionsTabActive]: transactionTab === this.activeTab }}
186173
data-testid={`${DataTestIdsEnum.signTransactionsTab}-${transactionTab.toLowerCase()}`}
187174
onClick={() => this.setActiveTab(transactionTab)}
188175
>
189-
<div class="sign-transactions-tab-text" data-testid={DataTestIdsEnum.signTransactionsTabText}>
176+
<div class={styles.signTransactionsTabText} data-testid={DataTestIdsEnum.signTransactionsTabText}>
190177
{transactionTab}
191178
</div>
192179
</div>
@@ -220,7 +207,7 @@ export class SignTransactionsPanel {
220207
handleCopyButtonClick={this.handleCopyButtonClick}
221208
/>
222209
</div>
223-
</mvx-side-panel>
210+
</mvx-side-panel >
224211
);
225212
}
226213
}

0 commit comments

Comments
 (0)