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

feat: add buttons to hide/show ui #632

Merged
merged 9 commits into from
Jan 20, 2025
Merged

feat: add buttons to hide/show ui #632

merged 9 commits into from
Jan 20, 2025

Conversation

dannyhw
Copy link
Member

@dannyhw dannyhw commented Oct 25, 2024

Issue:

What I did

image image

How to test

Please explain how to test your changes and consider the following questions

  • Does this need a new example in examples/expo-example?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

packages/react-native-ui/src/icon/FullscreenIcon.tsx Outdated Show resolved Hide resolved
packages/react-native-ui/src/Layout.tsx Outdated Show resolved Hide resolved
<TouchableOpacity
style={{
position: 'absolute',
bottom: uiHidden ? 56 + insets.bottom : 16,
Copy link
Contributor

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.

packages/react-native-ui/src/Layout.tsx Outdated Show resolved Hide resolved
@dannyhw
Copy link
Member Author

dannyhw commented Oct 27, 2024

thanks for all the feedback @tlow92 I definitely apply those and iterate a bit further to see what I can come up with

@dannyhw
Copy link
Member Author

dannyhw commented Jan 20, 2025

I think this is in a good place now, it would be cool to move it around but I'm thinking of adding that later

To hide this button you can use the following parameter, either globally in preview or at a story level

hideFullScreenButton: true,

@dannyhw dannyhw merged commit 0fee04d into next Jan 20, 2025
1 check passed
@dannyhw dannyhw deleted the feat/hide-ui-buttons branch January 20, 2025 23:10
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.

2 participants