Altinn / Altinn/app-frontend-react

Wrong placement for icon in Text component

Open
#3,939 0 comments 0 reactions 0 assignees View on GitHub
bonus good-first-issue squad/utforming status/for-consideration
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

### Description of the bug

The icon shown in `Text` is placed before `value` instead of `title`.
The expected behaviour is that the icon is placed before `title` as depicted in https://github.com/Altinn/app-frontend-react/issues/2170

### Steps To Reproduce

1. Add a `Text` component with an icon to a layout page. E.g.:
```json
{
"id": "ComponentID",
"type": "Text",
"textResourceBindings": {
"title": "Title"
},
"value": "value",
"icon": "Buildings3.svg",
"direction": "horizontal"
}
```

### Additional Information

Vertical direction:

Image

Horizontal direction:

Image

Expected behaviour (from https://github.com/Altinn/app-frontend-react/issues/2170):

Image

Contributor guide

Open the contributing guide

Research direction

Start by locating the Text component and reproducing the supplied layout configuration with an icon in both vertical and horizontal directions. Compare the current placement with the expected images; done means the icon appears before the title rather than before the value in each direction.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.