ConnectButton.js 645 B

12345678910111213141516171819202122
  1. import React from "react";
  2. import { Button, Layout } from "@ui-kitten/components";
  3. import { useModel } from "flooks";
  4. import { Linking } from "expo";
  5. export default function ConnectButton(props) {
  6. const { connect } = useModel("wordsModel");
  7. return (
  8. <>
  9. <Layout style={{ flex: 1, minHeight: 30 }} />
  10. <Button
  11. appearance='outline'
  12. style={{ alignSelf: "center" }}
  13. onPress={() => {
  14. Linking.openURL("tel:+123456789");
  15. }}
  16. >
  17. {connect}
  18. </Button>
  19. </>
  20. );
  21. }