Skip to content

Commit

Permalink
Fix the top position of the rich text editor toolbar (#2533)
Browse files Browse the repository at this point in the history
When used inside `AdminComponentRoot` but not as a direct child, the top
position should not take the height of the breadcrumbs into account, as
this will move the toolbar too far down.

---------

Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
  • Loading branch information
jamesricky and johnnyomair committed Sep 17, 2024
1 parent cab7c42 commit 46f9322
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changeset/sour-houses-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@comet/blocks-admin": patch
---

Fix the top position of the rich text editor toolbar

Previously, the rich text editor's toolbar would be moved too far down when used inside `AdminComponentRoot`, but not as a direct child.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ const AdminComponentRoot = (props: PropsWithChildren<Props>) => {
export { AdminComponentRoot };

const ChildrenContainer = styled("div")`
// TODO: Find another way to access this element, other than the className
.CometAdminRteToolbar-root {
> .CometAdminRte-root > .CometAdminRteToolbar-root {
top: 70px;
}
`;

0 comments on commit 46f9322

Please sign in to comment.