-
Notifications
You must be signed in to change notification settings - Fork 2
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
CHORE: Prepare native base to remove #34
Conversation
…com/binarapps/expo-ts-template into chore/prepare_native_base_to_remove
.eslintrc.js
Outdated
@@ -35,6 +35,7 @@ module.exports = { | |||
'react/prop-types': 'off', | |||
|
|||
'react-native/no-single-element-style-arrays': 'off', | |||
'react-native/no-color-literals': 'off', |
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.
We can't add it here, we can't have free colors inside files where react native views are, like View
or Text
src/components/atoms/Checkbox.tsx
Outdated
return 'white' | ||
} | ||
if (disabled) { | ||
return '#EBEBE4' |
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 color should come from theme, like gray100 or something.
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.
Use values from useTheme.
src/components/atoms/Checkbox.tsx
Outdated
@@ -0,0 +1,109 @@ | |||
import { forwardRef, useCallback, useMemo } from 'react' |
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.
@vercia
Did you check how this component look on both themes (light/dark)?
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.
src/components/atoms/Checkbox.tsx
Outdated
}, [disabled, value]) | ||
|
||
const borderColor = useMemo( | ||
() => (isError ? 'red' : disabled ? 'grey' : 'black'), |
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.
Colors from useTheme
|
||
const styles = StyleSheet.create({ | ||
text: { | ||
color: 'red', |
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 should come from useTheme
src/components/atoms/Select.tsx
Outdated
|
||
const styles = StyleSheet.create({ | ||
errorBorder: { | ||
borderColor: 'red', |
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.
useTheme
src/components/atoms/Select.tsx
Outdated
justifyContent: 'center', | ||
}, | ||
normalBorder: { | ||
borderColor: 'gray', |
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.
useTheme
src/components/atoms/Select.tsx
Outdated
}, | ||
textInput: { | ||
alignItems: 'center', | ||
backgroundColor: 'white', |
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.
useTheme
ref | ||
) => { | ||
const borderColor = useMemo(() => (isError ? 'red' : 'black'), [isError]) | ||
const bgColor = useCallback((item: string) => (item === value ? 'blue' : 'gray'), [value]) |
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.
useTheme
ref | ||
) => { | ||
const borderColor = useMemo(() => (isError ? 'red' : 'black'), [isError]) |
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.
useTheme
b2b3405
to
3e5380d
Compare
@vercia Could you have a look in your spare time? Cause I have made changes to your changes (e.g. I removed |
…m/binarapps/expo-ts-template into chore/prepare_native_base_to_remove
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.
Thank you for your fixes, I checked this and it looks ok 👍
Description
The first stage of migrating the native-base to another library OR custom solution (we haven't decided yet).
It provides updates on imports to make the migration as painless as possible.
Fixes # (issue-33)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Screenshot(s)
Android
iOS
Test Configuration:
Checklist: