Skip to content
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

Resolve lineheight units warning #153

Merged
merged 10 commits into from
Aug 18, 2022

Conversation

kajsaunge
Copy link
Contributor

@kajsaunge kajsaunge commented Aug 17, 2022

Removes usage of stylesheet create where possible
Removes style objects to use styled components

Adds px units for lineheight to get rid of units warning

Closes #143 #104

@kajsaunge kajsaunge changed the title Refactor to use styled components. Fixes warning of lineheight units Resolve lineheight units warning Aug 18, 2022
gewfy
gewfy previously approved these changes Aug 18, 2022
@@ -38,6 +38,7 @@ export default StyleSheet.create({
color: COLORS.GREY,
fontSize: 20,
lineHeight: 26,
padding: 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct @kajsaunge ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh thanks, I'll remove it 😬

},
const SafeAreaViewWrapper = styled(SafeAreaView)({flex: 1});

const ScrollViewWrapper = styled(ScrollView)({flex: 1});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You actually don't need to import components from react-native. Here you can instead write styled.ScrollView({flex: 1});

@kajsaunge kajsaunge merged commit 48d6c8e into main Aug 18, 2022
@kajsaunge kajsaunge deleted the remove-stylesheet-and-fix-unit-warning branch August 18, 2022 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WARN Expected style "lineHeight: 16" to contain units
2 participants