wave icon indicating copy to clipboard operation
wave copied to clipboard

Fix vertical alignment of upload icon in the FilePicker (on mobile)

Open JanHamara opened this issue 2 years ago • 1 comments

  • @freenow/wave version: 1.29.0

Relevant code

Inside FilePicker.tsx

<Outliner
                minHeight="5.125rem"
                alignItems="stretch"
                data-testid="filepicker-outliner"
                display="flex"
                disabled={disabled}
                hasValidFile={validFileSelected}
                error={error}
                justifyContent="space-between"
                onClick={onClickHandler}
                px={2}
                py={validFileSelected ? '1.25rem' : 3}
            >

What was expected to happen?

The current setting of alignItems="stretch" in the <Outliner> is causing the upload icon on mobile screens to not center vertically correctly.

Screenshot 2023-03-09 at 11 00 54

Solution

Change the value for alignItems to center

JanHamara avatar Mar 09 '23 10:03 JanHamara

The issue is with icon positioning in flexbox on mobile only

nlopin avatar Mar 09 '23 10:03 nlopin