-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ListItemLink alignment #1088
Conversation
🦋 Changeset detectedLatest commit: 1f81f68 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1f81f68:
|
@@ -186,7 +186,7 @@ const getProps = ({ | |||
isVisited, | |||
}) as IconProps['color'], | |||
fontSize: size === 'medium' ? 100 : 75, | |||
lineHeight: size === 'medium' ? 'm' : 's', | |||
lineHeight: size === 'medium' ? 'l' : 's', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an incorrect implementation 🙈. It is l
instead of m
on Figma as well.
✅ PR title follows Conventional Commits specification. |
children, | ||
size, | ||
}: { | ||
children: (React.ReactChild | React.ReactFragment | React.ReactPortal)[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we kept this so specific? eg: Fragment, ReactPortal.
Can we use React.ReactNode instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had done it to suppress a warning. Made it ReactNode now. Draft PR hai, have mercy 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol sorry, was reviewing this at airport :p
React native has a vertical alignment bug that causes nested text which also has its own view inside to cause misalignment. This PR wraps all the children of list item (text and view) in a flex and aligns them.
Ref: facebook/react-native#31955
Before this PR:
![Simulator Screen Shot - iPhone 14 Pro - 2023-03-28 at 11 07 59](https://user-images.githubusercontent.com/24487274/228138970-85fb5cb5-464a-4b38-bf28-7948aee63de1.png)
After this PR:
![Simulator Screen Shot - iPhone 14 Pro - 2023-03-28 at 11 09 24](https://user-images.githubusercontent.com/24487274/228138987-eb14a5d7-107c-497b-9020-c7bed11a7839.png)