mapbox / mapbox/mr-ui

Button component cannot match height of form controls

Open
#81 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

jira-sync-complete
Dominant language
TypeScript
Stars
90
Forks
5
PR merge metrics
No merged PRs in 30d

Description

When you put a select next to a button, all the `Button` sizes add either too much padding or not enough so that the two elements do not line up:

Size | Button
:-----|:-------
`small` | ![image](https://user-images.githubusercontent.com/2180540/57784325-bb23cd80-76fd-11e9-9408-0b128ce5ec48.png)
`medium` | ![image](https://user-images.githubusercontent.com/2180540/57784355-c70f8f80-76fd-11e9-9247-f60d7f0e30b7.png)
`large`/default | ![image](https://user-images.githubusercontent.com/2180540/57784386-d1ca2480-76fd-11e9-9b9a-935ee8eb0850.png)
What I want
(_just right 🐻_) | ![image](https://user-images.githubusercontent.com/2180540/57783397-0d63ef00-76fc-11e9-87cf-342ce7c74c4f.png)

To achieve the desired look we can use ``.

Have we considered making the default `` component (without options) look like ``?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Button component and compare its small, medium, and large/default sizing with the native button class behavior described in the issue. Verify the component aligns vertically with adjacent select controls at each size, and add or update coverage if the project has relevant Button tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.