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

Commit fdd8184

Browse files
feat: no link if title
1 parent fc5b2a1 commit fdd8184

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

studio/src/app/pages/app-editor/app-editor.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ app-editor {
1818
--deckgo-inline-editor-button-mobile-color: var(--ion-color-dark);
1919

2020
ion-icon[slot="link"] {
21-
padding-top: 10px;
21+
padding-top: 12px;
22+
font-size: 1.2rem;
2223
}
2324
}
2425

webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class DeckdeckgoInlineEditor {
3434
private color: string;
3535

3636
@State()
37-
private disableBold: boolean = false;
37+
private disabledTitle: boolean = false;
3838

3939
@Prop({mutable: true})
4040
mobile: boolean = false;
@@ -249,7 +249,7 @@ export class DeckdeckgoInlineEditor {
249249
}
250250

251251
if (DeckdeckgoInlineEditorTag[node.nodeName.toUpperCase()]) {
252-
this.disableBold = DeckdeckgoInlineEditorTag[node.nodeName.toUpperCase()] !== DeckdeckgoInlineEditorTag.P;
252+
this.disabledTitle = DeckdeckgoInlineEditorTag[node.nodeName.toUpperCase()] !== DeckdeckgoInlineEditorTag.P;
253253

254254
await this.findColor(node);
255255

@@ -641,7 +641,7 @@ export class DeckdeckgoInlineEditor {
641641
const styleColor = this.color ? {'border-bottom': '2px solid ' + this.color} : {};
642642

643643
return [
644-
<button onClick={(e: UIEvent) => this.styleBold(e)} disabled={this.disableBold}
644+
<button onClick={(e: UIEvent) => this.styleBold(e)} disabled={this.disabledTitle}
645645
class={this.bold ? "bold active" : "bold"}>B
646646
</button>,
647647
<button onClick={(e: UIEvent) => this.styleItalic(e)}
@@ -660,7 +660,9 @@ export class DeckdeckgoInlineEditor {
660660

661661
<div class="separator"></div>,
662662

663-
<button onClick={() => {this.toggleLink()}} class={this.link ? "link active" : "link"}>
663+
<button
664+
disabled={this.disabledTitle}
665+
onClick={() => {this.toggleLink()}} class={this.link ? "link active" : "link"}>
664666
<slot name="link"></slot>
665667
</button>
666668
];

0 commit comments

Comments
 (0)