aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorButtons.tsx
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-08-17 21:43:29 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-08-17 21:43:29 +0200
commitbb900e1bd40a6b7efd7a538114d985ea7f7e3e88 (patch)
treebb15a937ade92313dc654a640bc1de925442eff2 /subprojects/frontend/src/editor/EditorButtons.tsx
parentrefactor(frondend): improve editor store and theme (diff)
downloadrefinery-bb900e1bd40a6b7efd7a538114d985ea7f7e3e88.tar.gz
refinery-bb900e1bd40a6b7efd7a538114d985ea7f7e3e88.tar.zst
refinery-bb900e1bd40a6b7efd7a538114d985ea7f7e3e88.zip
feat(frontend): custom search panel
Also improves editor styling (to enable panel styling).
Diffstat (limited to 'subprojects/frontend/src/editor/EditorButtons.tsx')
-rw-r--r--subprojects/frontend/src/editor/EditorButtons.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/subprojects/frontend/src/editor/EditorButtons.tsx b/subprojects/frontend/src/editor/EditorButtons.tsx
index 34b64751..95da52c8 100644
--- a/subprojects/frontend/src/editor/EditorButtons.tsx
+++ b/subprojects/frontend/src/editor/EditorButtons.tsx
@@ -56,6 +56,7 @@ function EditorButtons(): JSX.Element {
56 selected={editorStore.showLineNumbers} 56 selected={editorStore.showLineNumbers}
57 onClick={() => editorStore.toggleLineNumbers()} 57 onClick={() => editorStore.toggleLineNumbers()}
58 aria-label="Show line numbers" 58 aria-label="Show line numbers"
59 aria-controls={editorStore.lineNumbersId}
59 value="show-line-numbers" 60 value="show-line-numbers"
60 > 61 >
61 <FormatListNumberedIcon fontSize="small" /> 62 <FormatListNumberedIcon fontSize="small" />
@@ -64,6 +65,9 @@ function EditorButtons(): JSX.Element {
64 selected={editorStore.searchPanel.state} 65 selected={editorStore.searchPanel.state}
65 onClick={() => editorStore.searchPanel.toggle()} 66 onClick={() => editorStore.searchPanel.toggle()}
66 aria-label="Show find/replace" 67 aria-label="Show find/replace"
68 {...(editorStore.searchPanel.state && {
69 'aria-controls': editorStore.searchPanel.id,
70 })}
67 value="show-search-panel" 71 value="show-search-panel"
68 > 72 >
69 <SearchIcon fontSize="small" /> 73 <SearchIcon fontSize="small" />
@@ -72,6 +76,9 @@ function EditorButtons(): JSX.Element {
72 selected={editorStore.lintPanel.state} 76 selected={editorStore.lintPanel.state}
73 onClick={() => editorStore.lintPanel.toggle()} 77 onClick={() => editorStore.lintPanel.toggle()}
74 aria-label="Show diagnostics panel" 78 aria-label="Show diagnostics panel"
79 {...(editorStore.lintPanel.state && {
80 'aria-controls': editorStore.lintPanel.id,
81 })}
75 value="show-lint-panel" 82 value="show-lint-panel"
76 > 83 >
77 {getLintIcon(editorStore.highestDiagnosticLevel)} 84 {getLintIcon(editorStore.highestDiagnosticLevel)}