-
Notifications
You must be signed in to change notification settings - Fork 130
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/showtime/showtime/98GwqsauLvP3SitkTxn2WDiypLtu |
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.
Not requested, but still reviewing :D
Overall LGTM, just had two kind of subjective nits
onChange(!checked) | ||
}, [onChange, checked]) | ||
|
||
const isDark = useColorScheme() === '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.
nit (and might not be worth handling in this PR): I see we are repeating this line at multiple places in the codebase.
Might be worth to have a useIsDarkMode
that just returns wether color scheme is dark. And also maybe have a ColorSchemes
Enum to avoid using magic strings
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.
Yeah agreed. I wrote this multiple times too 🤦♂️
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.
Screen.Recording.2021-12-07.at.1.22.55.PM.mov
Agreed 😂
Will put you in request next time :D. Your reviews are helpful! Added the hook.
|
||
const isDark = useColorScheme() === 'dark' | ||
|
||
const commonChild = ( |
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.
nit: it would be IMO more readable to have this as an actual component. Here when reading Checkbox
, I need to first scan through an unnamed component out of context
Def not blocking of course
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.
Changed the approach on web. Won't need commonChild
anymore 🎉
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.
Looking very good on mobile! But it doesn't seem to work on web?
@@ -34,6 +36,8 @@ export const decorators = [ | |||
] | |||
|
|||
const MainAxisCenter = ({ children }) => { | |||
useDeviceContext(tw) |
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 remove this now, added it to the tabs PR here: 23d37b2
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.
Can you test it again?
Something was off with the input used. Changed the approach on web, should work now! Let me know
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.
Yeah it's working now ✨
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.
LGTM ✨
Checkbox