Skip to content

Commit c4db1c6

Browse files
committed
Switch to mat-icon class to solve missing spacing in button
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@owasp.org>
1 parent 1f4bc99 commit c4db1c6

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

frontend/src/app/web3-sandbox/web3-sandbox.component.html

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ <h2 translate>TITLE_WEB3_SANDBOX</h2>
4343
mat-raised-button
4444
(click)="compileAndFetchContracts(code)"
4545
>
46-
<i class="material-icons">
47-
build
48-
</i>
46+
<mat-icon>build</mat-icon>
4947
{{ "BTN_COMPILE_CONTRACT" | translate}}
5048
</button>
5149
<div *ngIf="compilerErrors.length > 0" class="error-container mat-elevation-z6">
@@ -86,9 +84,7 @@ <h3 class="contracts-title">{{ "TITLE_CONTRACT_DEPLOYMENT" | translate}}</h3>
8684
type="button"
8785
(click)="deploySelectedContract()"
8886
>
89-
<i class="material-icons">
90-
link
91-
</i>
87+
<mat-icon>link</mat-icon>
9288
{{ "BTN_DEPLOY_SELECTED_CONTRACT" | translate}}
9389
</button>
9490
</div>
@@ -106,9 +102,7 @@ <h3 translate>TITLE_INTERACT_WITH_CONTRACT</h3>
106102
type="button"
107103
(click)="invokeFunction(func)"
108104
>
109-
<i class="material-icons">
110-
call_to_action
111-
</i>
105+
<mat-icon>call_to_action</mat-icon>
112106
{{ "BTN_INVOKE" | translate}} {{ func.name }}
113107
</button>
114108
<mat-form-field appearance="outline" color="accent">
@@ -133,9 +127,7 @@ <h3 translate>TITLE_INTERACT_WITH_CONTRACT</h3>
133127
type="button"
134128
(click)="invokeFunction(func)"
135129
>
136-
<i class="material-icons">
137-
call_to_action
138-
</i>
130+
<mat-icon>call_to_action</mat-icon>
139131
{{ "BTN_INVOKE" | translate}} {{ func.name }}
140132
</button>
141133
<div class="invoke-output" *ngIf="func.outputValue !== ''">

frontend/src/app/web3-sandbox/web3-sandbox.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { NgIf, NgFor } from '@angular/common'
1919
import { MatButtonModule } from '@angular/material/button'
2020
import { FormsModule } from '@angular/forms'
2121
import { CodemirrorModule } from '@ctrl/ngx-codemirror'
22+
import { MatIconModule } from '@angular/material/icon'
2223

2324
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2425
const client = createClient({
@@ -42,7 +43,7 @@ const compilerReleases = {
4243
templateUrl: './web3-sandbox.component.html',
4344
styleUrls: ['./web3-sandbox.component.scss'],
4445
standalone: true,
45-
imports: [CodemirrorModule, FormsModule, MatButtonModule, NgIf, TranslateModule, MatFormFieldModule, MatLabel, MatInputModule, NgFor]
46+
imports: [CodemirrorModule, FormsModule, MatButtonModule, MatIconModule, NgIf, TranslateModule, MatFormFieldModule, MatLabel, MatInputModule, NgFor]
4647
})
4748
export class Web3SandboxComponent {
4849
constructor (

0 commit comments

Comments
 (0)