-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat: add buttons to hide/show ui #632
base: next
Are you sure you want to change the base?
Conversation
import { useTheme } from '@storybook/react-native-theming'; | ||
|
||
export function FullscreenIcon({ | ||
color, //= '#2E3438', |
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.
I guess this is a missed debug statement?
borderWidth: 1, | ||
borderColor: theme.appBorderColor, | ||
}} | ||
onPress={() => setUiHidden(!uiHidden)} |
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.
Even though we don't have any other calls of setUiHidden
so it should not be a problem. I would suggest using function setter for toggling.
onPress={() => setUiHidden(!uiHidden)} | |
onPress={() => setUiHidden(prev => !prev)} |
<TouchableOpacity | ||
style={{ | ||
position: 'absolute', | ||
bottom: uiHidden ? 56 + insets.bottom : 16, |
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.
I think in the future it might be useful to make it draggable (like android notification bubbles), in case it overlaps with buttons of a story component.
<CloseFullscreenIcon color={theme.color.mediumdark} /> | ||
) : ( | ||
<FullscreenIcon color={theme.color.mediumdark} /> |
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.
Probably it's better to use theme.background.content
.
Otherwise it does not respeect browsers darkmode, right?
thanks for all the feedback @tlow92 I definitely apply those and iterate a bit further to see what I can come up with |
Issue:
What I did
How to test
Please explain how to test your changes and consider the following questions
If your answer is yes to any of these, please make sure to include it in your PR.