Skip to content

pablords/mistica-react-native

Repository files navigation

mistica-react-native

Exposes native components from the mistica-ios and mistica-android libraries to be used as react-native components

Installation

npm install mistica-react-native

ios

Add mistica-ios dependencies in Podfile

  pod 'Mistica', :git => 'https://github.com/pablords/mistica-ios.git', :branch => "podspec-support"
  pod 'SDWebImage', :modular_headers => true
  pod 'SDWebImageSVGCoder', :modular_headers => true

Install pod dependencies

cd ios && pod install

Android

Add mistica-android dependencie in build.gradle

repositories {
  mavenCentral()
  google()
}

dependencies {
  implementation "com.telefonica:mistica:11.2.2"
}

Usage

Button

import { Button } from 'mistica-react-native';

export function App() {

  const handlePress = () => {
    Alert.alert('handlePress');
  };

  return (
      <Button
        style={{
          width: 300,
          height: 50,
          position: 'absolute',
          bottom: 20,
          left: 35,
          marginBottom: 60,
          flex: 1,
        }}
        title="BOTAO"
        onPress={handlePress}
      />
  );
}

TextInput

import { TextInput } from 'mistica-react-native';

export function App() {

  const handleChangeText = (text: string) => {
    console.log(text);
  };

  return (
      <TextInput
        style={{
          position: 'absolute',
          top: 230,
          left: 15,
          right: 0,
          bottom: 0,
          width: '90%',
        }}
        placeholder="Digite seu Nome"
        onChangeText={handleChangeText}
      />
  );
}

buton_input

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •