mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #34065 from overleaf/ds-move-toggle-to-right
[WEB] Move Code/Visual toggle to right-hand side and redesign GitOrigin-RevId: efc1aa062fd44e20fdf719a6d4ecba9d8bb0e5e8
This commit is contained in:
@@ -173,7 +173,6 @@ const Toolbar = memo(function Toolbar() {
|
||||
className="ol-cm-toolbar toolbar-editor"
|
||||
ref={elementRef}
|
||||
>
|
||||
{!visualPreviewEnabled && <EditorSwitch />}
|
||||
{showActions && (
|
||||
<ToolbarItems
|
||||
state={state}
|
||||
@@ -206,6 +205,7 @@ const Toolbar = memo(function Toolbar() {
|
||||
className="ol-cm-toolbar-button-group ol-cm-toolbar-end"
|
||||
ref={handleButtons}
|
||||
>
|
||||
{!visualPreviewEnabled && <EditorSwitch />}
|
||||
{sourceEditorToolbarEndButtons.map(
|
||||
({ import: { default: Component }, path }) => (
|
||||
<Component key={path} />
|
||||
|
||||
@@ -57,7 +57,7 @@ function EditorSwitch() {
|
||||
onChange={handleChange}
|
||||
/>
|
||||
<label htmlFor={inputId} className="toggle-switch-label">
|
||||
<span>{t('code_editor')}</span>
|
||||
<span>{t('code')}</span>
|
||||
</label>
|
||||
|
||||
<RichTextToggle
|
||||
@@ -92,7 +92,7 @@ const RichTextToggle: FC<{
|
||||
disabled={disabled}
|
||||
/>
|
||||
<label htmlFor={inputId} className="toggle-switch-label">
|
||||
<span>{t('visual_editor')}</span>
|
||||
<span>{t('visual')}</span>
|
||||
</label>
|
||||
</span>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user