mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-05 00:22:42 +00:00
Left-align boost/quote menu to prevent shift based on descriptions (#36220)
This commit is contained in:
parent
6689040fc6
commit
66afc13b7f
|
@ -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,
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue
Block a user