ConnectButton.js 675 B

1234567891011121314151617181920212223
  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. {props.children}
  11. <Button
  12. appearance='outline'
  13. style={{ alignSelf: "center" }}
  14. onPress={() => {
  15. Linking.openURL("tel:+123456789");
  16. }}
  17. >
  18. {connect}
  19. </Button>
  20. </>
  21. );
  22. }