question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support right alignment in SelectMenu

See original GitHub issue

The SelectMenu in Primer CSS supports aligning the modal with the button: https://primer.style/css/components/select-menu#right-aligned

We should add a corresponding prop to SelectMenu.Modal and possibly provide an example showing how to do so.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
BinaryMusecommented, May 5, 2020

I think the only strong opinion I have is to not use any more alignRight style booleans, unless it really is a boolean state (like hidden). align or variant can be expanded easily, alignRight can’t.

1reaction
dmarceycommented, May 5, 2020

It looks like Tooltip uses align?: 'left' | 'right', UnderlineNav uses align?: 'right' (just right? maybe a TS bug?), and AvatarStack uses alignRight?: boolean.

I couldn’t find an example where variant was used to handle alignment, but it doesn’t seem too far-fetched.

In light of these examples, I think I’ll give a shot at align?: 'left' | 'right' which defaults to 'left' and we can see how that looks in the PR.

Thanks @BinaryMuse !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Right-align dropdown menu in select2 - Stack Overflow
As you want to have different sizes of the select and the dropdown, here is my solution using select2 built-in options and some...
Read more >
Primer CSS Select Menu Right aligned - GeeksforGeeks
A select menu provides support for website navigation, filtering, etc. We can align the select menu to the right using SelectMenu right-* class....
Read more >
How to Left-Align or Right-Align Folder Drop Downs | Will-Myers
Here are two css snippets to help you switch the default alignment of your main nav folder dropdowns items. Switch from left-aligned to ......
Read more >
gui design - Should text-alignment of drop-down menus be left ...
I came across this right aligned text dropdown menu on eBay.com: While I'm sure I've seen this before, I've never contemplated the benefits....
Read more >
How to right justify characters entered by drop-down list.
Hi,. You cannot do that with a dropdown menu. There may be a few people out there that will know how to mess...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found