Left-align boost/quote menu to prevent shift based on descriptions (#36220)

This commit is contained in:
diondiondion 2025-09-22 13:54:06 +02:00 committed by GitHub
parent 6689040fc6
commit 66afc13b7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -333,6 +333,7 @@ interface DropdownProps<Item extends object | null = MenuItem> {
disabled?: boolean;
scrollable?: boolean;
placement?: Placement;
offset?: OffsetValue;
/**
* Prevent the `ScrollableList` with this scrollKey
* from being scrolled while the dropdown is open
@ -348,7 +349,6 @@ interface DropdownProps<Item extends object | null = MenuItem> {
onItemClick?: ItemClickFn<Item>;
}
const offset = [5, 5] as OffsetValue;
const popperConfig = { strategy: 'fixed' } as UsePopperOptions;
export const Dropdown = <Item extends object | null = MenuItem>({
@ -361,6 +361,7 @@ export const Dropdown = <Item extends object | null = MenuItem>({
disabled,
scrollable,
placement = 'bottom',
offset = [5, 5],
status,
forceDropdown = false,
renderItem,

View File

@ -134,6 +134,8 @@ export const StatusBoostButton: FC<ReblogButtonProps> = ({
return (
<Dropdown
placement='bottom-start'
offset={[-19, 5]} // This aligns button icon with menu icons
items={items}
renderItem={renderMenuItem}
onOpen={handleDropdownOpen}