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

Add Keyboard api facade #293

Merged
merged 3 commits into from Sep 10, 2019

Conversation

@zakpatterson
Copy link
Contributor

commented Sep 9, 2019

Facades {Keyboard} from 'react-native'

With this patch, one can write something like the following, and get keyboard dismissing behavior when the user clicks in the background.

  def KeyboardDismissingView(mods: TagMod[Nothing]*) = TouchableHighlight(
    onPress = () => Keyboard.dismiss(),  // Keyboard.dismiss() added by this PR.
    style = literal(
      flex = 1,
    ),
  )(mods: _*)
Add Keyboard api facade
Facades {Keyboard} from 'react-native'
@shadaj
Copy link
Owner

left a comment

Thanks for the PR @zakpatterson, this looks really great! Just one small change to the type definitions, but otherwise looks good to go!

Could you also add a line to the changelog for these changes?

native/src/main/scala/slinky/native/Keyboard.scala Outdated Show resolved Hide resolved
@shadaj
shadaj approved these changes Sep 10, 2019
Copy link
Owner

left a comment

Looks great! Thanks again for the PR!

@shadaj shadaj merged commit aa93a74 into shadaj:master Sep 10, 2019

7 of 9 checks passed

test
Details
build-docs
Details
build-intellij-plugin
Details
publish
Details
Header rules No header rules processed
Details
Pages changed 1 new file uploaded
Details
Mixed content No mixed content detected
Details
Redirect rules 1 redirect rule processed
Details
deploy/netlify Deploy preview ready!
Details
@zakpatterson

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

Thank you for this library and being open, helpful, and responsive to PRs. I hope to work on this a bunch. Thank you thank you.

@zakpatterson zakpatterson deleted the zakpatterson:feature-add-keyboard-facade branch Sep 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.