Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
vassbence committed Nov 21, 2024
1 parent c614349 commit f470a80
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions src/components/RichTextEditor/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,20 @@ export function Toolbar({ onOpenChange }: ToolbarProps) {
borderBottom: `1px solid ${colors.neutral20Adjusted}`,
}}
>
<Button
size="small"
leadIcon="arrow-left"
variant="ghost"
onClick={() => {
onOpenChange(false)
}}
keyHint="Esc"
tooltip="Close editor"
keyHintPlacement="tooltip"
>
Back
</Button>
<Separator />
<Menu>
<Menu.Trigger>
{({ open }) => (
Expand Down Expand Up @@ -493,7 +507,6 @@ export function Toolbar({ onOpenChange }: ToolbarProps) {
justifyContent: 'center',
alignItems: 'center',
marginLeft: 'auto',
gap: 2,
}}
>
<Menu>
Expand Down Expand Up @@ -531,13 +544,6 @@ export function Toolbar({ onOpenChange }: ToolbarProps) {
</Menu.ToggleItem>
</Menu.Items>
</Menu>
<IconButton
size="small"
icon="full-screen-off"
onClick={() => {
onOpenChange(false)
}}
/>
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/RichTextEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function RichTextEditor({
return (
<div
style={{
position: 'absolute',
position: 'fixed',
inset: 0,
background: colors.neutralInverted100,
zIndex: 3,
Expand Down

0 comments on commit f470a80

Please sign in to comment.