Skip to content

Commit 22e70c1

Browse files
committed
🐛(frontend) fix button markdown not visible
On smaller screens, the markdown button in the toolbar was not every time visible. We fix this issue.
1 parent 0be822c commit 22e70c1

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteToolBar/MarkdownButton.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import {
66
import { forEach, isArray } from 'lodash';
77
import React, { useMemo } from 'react';
88
import { useTranslation } from 'react-i18next';
9+
import { css } from 'styled-components';
10+
11+
import { Text } from '@/components';
912

1013
type Block = {
1114
type: string;
@@ -83,8 +86,18 @@ export function MarkdownButton() {
8386
mainTooltip={t('Convert Markdown')}
8487
onClick={handleConvertMarkdown}
8588
className="--docs--editor-markdown-button"
86-
>
87-
M
88-
</Components.FormattingToolbar.Button>
89+
label="M"
90+
icon={
91+
<Text
92+
aria-hidden={true}
93+
$css={css`
94+
font-family: var(--c--theme--font--families--base);
95+
`}
96+
$weight="bold"
97+
>
98+
M
99+
</Text>
100+
}
101+
/>
89102
);
90103
}

src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ export const cssEditor = (readonly: boolean, isDeletedDoc: boolean) => css`
141141
pointer-events: none;
142142
}
143143
`}
144+
145+
.bn-toolbar {
146+
max-width: 95vw;
147+
}
144148
}
145149
146150
& .bn-editor {

0 commit comments

Comments
 (0)