Skip to content

Commit

Permalink
chore: add button type
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdehaven committed Jan 2, 2024
1 parent 3075e52 commit 8a5c468
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/toolbar/MarkdownToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:class="{ 'active': mode === 'edit' }"
:disabled="mode === 'edit'"
:tabindex="0"
type="button"
@click.prevent="changeMode('edit')"
>
Edit
Expand All @@ -20,13 +21,15 @@
class="mode-split-button"
:class="{ 'active': mode === 'split' }"
:tabindex="0"
type="button"
@click.prevent="changeMode('split')"
>
Split
</button>
<button
:class="{ 'active': mode === 'preview' }"
:tabindex="0"
type="button"
@click.prevent="changeMode('preview')"
>
Preview
Expand Down
1 change: 1 addition & 0 deletions src/components/toolbar/ToolbarButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<button
class="toolbar-button"
:class="[{ 'has-text': !icon }, appearance]"
type="button"
>
<slot name="default" />
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useMarkdownIt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function useMarkdownIt() {
return `
<div class="kong-markdown-code-block-container" style="position: relative">
${originalContent}
<button class="kong-markdown-code-block-copy" data-copytext="${content}" aria-label="Copy code" tabindex="0">
<button class="kong-markdown-code-block-copy" data-copytext="${content}" aria-label="Copy code" tabindex="0" type="button">
${COPY_ICON_SVG}
</button>
</div>
Expand Down

0 comments on commit 8a5c468

Please sign in to comment.