Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 6193ce3

Browse files
feat: mode type button toolbar
1 parent c10e701 commit 6193ce3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

studio/src/app/components/editor/app-editor-toolbar/app-editor-toolbar.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -607,15 +607,23 @@ export class AppEditorToolbar {
607607
render() {
608608
return [
609609
<div class={this.displayed ? "editor-toolbar displayed" : "editor-toolbar"}>
610-
{this.renderActions()}
610+
{this.renderDelete()}
611611
{this.renderSlotType()}
612+
{this.renderActions()}
612613
{this.renderCodeOptions()}
613614
</div>,
614615
<input type="color" name="color-picker" value={this.color}></input>,
615616
<input type="color" name="background-picker" value={this.background}></input>
616617
];
617618
}
618619

620+
private renderDelete() {
621+
return <a onClick={() => this.deleteElement()}
622+
class={this.deckBusy && this.deckOrSlide ? "disabled" : undefined}>
623+
<ion-icon name="trash"></ion-icon>
624+
</a>
625+
}
626+
619627
private renderActions() {
620628
const styleColor = {
621629
'border-bottom': '2px solid ' + this.color
@@ -625,10 +633,7 @@ export class AppEditorToolbar {
625633
'border-bottom': '2px solid ' + this.background
626634
};
627635

628-
return [<a onClick={() => this.deleteElement()}
629-
class={this.deckBusy && this.deckOrSlide ? "disabled" : undefined}>
630-
<ion-icon name="trash"></ion-icon>
631-
</a>,
636+
return [
632637
<a onClick={(e: UIEvent) => this.openForDeckOrSlide(e, this.openColorPicker)}>
633638
<ion-label style={styleColor}>A</ion-label>
634639
</a>,

studio/src/components.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
import '@stencil/core';
99

1010
import '@ionic/core';
11+
import 'ionicons';
1112
import 'deckdeckgo';
1213
import 'deckdeckgo-highlight-code';
1314
import 'deckdeckgo-inline-editor';
1415
import 'deckdeckgo-qrcode';
1516
import 'deckdeckgo-remote';
16-
import 'ionicons';
1717
import {
1818
EventEmitter,
1919
} from '@stencil/core';

0 commit comments

Comments
 (0)