feat(editor): show tooltip when the editor is read-only (#34)

This commit is contained in:
Dominic Elm
2024-08-09 13:42:30 +02:00
committed by GitHub
parent 7465cab8f8
commit 6e99e4c11e
7 changed files with 109 additions and 10 deletions

View File

@@ -168,6 +168,18 @@ function getEditorTheme(settings: EditorSettings) {
'.cm-searchMatch': {
backgroundColor: 'var(--cm-searchMatch-backgroundColor)',
},
'.cm-tooltip.cm-readonly-tooltip': {
padding: '4px',
whiteSpace: 'nowrap',
backgroundColor: 'var(--bolt-elements-bg-depth-2)',
borderColor: 'var(--bolt-elements-borderColorActive)',
'& .cm-tooltip-arrow:before': {
borderTopColor: 'var(--bolt-elements-borderColorActive)',
},
'& .cm-tooltip-arrow:after': {
borderTopColor: 'transparent',
},
},
});
}