equinor / equinor/mad

Icon button takes the height of its parent container

Open
#718 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
23
Forks
3
Avg merge
1d 17h
Merged PRs (30d)
4

Description

### Package / App

MAD Components

### Version

0.20.0

### What happened?

When using the `Button.Icon` component the height is the same as the height of its parent container.

Image

### Other info

```jsx



This is a title spanning three lines

navigate(Routes.SETTINGS)}
style={{ backgroundColor: "red" }}
/>

```

To get this to work as intended I have to wrap a `View` around the `Button.Icon` like this:

```jsx



This is a title spanning three lines


navigate(Routes.SETTINGS)}
style={{ backgroundColor: "red" }}
/>

```

Making it look like this:

Image

### Relevant log output

```shell

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the MAD Components Button.Icon entry point and reproduce the reported layout with the JSX example, comparing the direct button with the version wrapped in View. Done means Button.Icon keeps its intended height inside the row without requiring an extra wrapper.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.