Skip to content

Commit 2dedaa0

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 2a8217b commit 2dedaa0

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
@@ -112,6 +112,10 @@ export const cssEditor = (readonly: boolean) => css`
112112
.bn-block-outer:not([data-prev-depth-changed]):before {
113113
border-left: none;
114114
}
115+
116+
.bn-toolbar {
117+
max-width: 95vw;
118+
}
115119
}
116120
117121
& .bn-editor {

0 commit comments

Comments
 (0)