Skip to content

Commit

Permalink
Update ThemedColorInput.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Dec 14, 2024
1 parent fa9589e commit b453b32
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,15 @@ export const ThemedColorInput = observer(
if (this.dropDownOpen) {
const rectButton = buttonEl.getBoundingClientRect();

const DROP_DOWN_WIDTH = 280;
const DROP_DOWN_WIDTH = 230;
const DROP_DOWN_HEIGHT = 268;

this.dropDownLeft = rectButton.right - DROP_DOWN_WIDTH;
this.dropDownTop = rectButton.bottom;

this.dropDownTop = rectButton.bottom - 9;
if (this.dropDownTop + DROP_DOWN_HEIGHT > window.innerHeight) {
this.dropDownTop = window.innerHeight - DROP_DOWN_HEIGHT;
}
}
});

Expand Down Expand Up @@ -202,6 +207,7 @@ export const ThemedColorInput = observer(

this.onChangeColor(color.hex, false);
}}
placement={"" as any}
/>
</div>,
document.body
Expand Down

0 comments on commit b453b32

Please sign in to comment.