feat: switch editor and render view buttons (#2154)

This was done in an effort to sync the side of the button with the side of the component in the editor.

fixes #1236

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2022-07-01 14:10:35 +02:00 committed by GitHub
parent 718994fa25
commit 6c82992c22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
@ -31,11 +31,11 @@ export const EditorViewMode: React.FC = () => {
setEditorMode(value)
}}>
<ToggleButton
{...cypressId('view-mode-preview')}
value={EditorMode.PREVIEW}
{...cypressId('view-mode-editor')}
value={EditorMode.EDITOR}
variant='outline-secondary'
title={t('editor.viewMode.view')}>
<ForkAwesomeIcon icon='eye' />
title={t('editor.viewMode.edit')}>
<ForkAwesomeIcon icon='pencil' />
</ToggleButton>
<ToggleButton
{...cypressId('view-mode-both')}
@ -45,11 +45,11 @@ export const EditorViewMode: React.FC = () => {
<ForkAwesomeIcon icon='columns' />
</ToggleButton>
<ToggleButton
{...cypressId('view-mode-editor')}
value={EditorMode.EDITOR}
{...cypressId('view-mode-preview')}
value={EditorMode.PREVIEW}
variant='outline-secondary'
title={t('editor.viewMode.edit')}>
<ForkAwesomeIcon icon='pencil' />
title={t('editor.viewMode.view')}>
<ForkAwesomeIcon icon='eye' />
</ToggleButton>
</ToggleButtonGroup>
)