[Glitch] Left-align boost/quote menu to prevent shift based on descriptions
Port 66afc13b7f8e6c22cdb356d0578caf3f967b371b to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
986e6b1505
commit
4ba1ad75e0
@ -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…
x
Reference in New Issue
Block a user