Giter Site home page Giter Site logo

iamdylanngo / native-extension Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 24 KB

Native Extension is open source framework, UI component for React Native

Home Page: https://github.com/jundat95/native-extension.git

License: MIT License

JavaScript 100.00%
react-native components ui-components native-extension

native-extension's Introduction

NativeExtension is open source framework. Essential cross-platform UI components for React Native

Here is direct link to npm package link

Here is direct link to yarn package link

Here is direct link to github link

Components

  1. Header
  2. Switch
  3. StarRating

Getting Started

Setup with React Native app

Install NativeExtension

npm install native-extension --save

Compatibility Versions

NativeExtension React Native
v0.0.1 v0.57

Using

1. Header

import { Header } from 'native-extension';

const ComponentLeft = () =>
    <View style={{ flex: 1, alignItems: 'flex-start' }} >
        <Image
            source={require('../../assets/images/ic_search.png')}
            style={{ resizeMode: 'contain', width: 25, height: 25, marginLeft: 10, alignSelf: 'flex-start' }}
        />
    </View>;


const ComponentCenter = () =>
    <View style={{ flex: 1 }}>
        <Image
            source={require('../../assets/images/ic_google.png')}
            style={{ resizeMode: 'contain', width: 200, height: 35, alignSelf: 'center' }}
        />
    </View>;

const ComponentRight = () =>
    <View style={{ flex: 1 }}>
        <Image
            source={require('../../assets/images/ic_profile.png')}
            style={{ resizeMode: 'contain', width: 35, height: 35, marginRight: 10, alignSelf: 'flex-end' }}
        />
    </View>;
 
class App extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Header 
          componentLeft     = { ComponentLeft   }
          componentCenter   = { ComponentCenter }
          componentRight    = { ComponentRight  }
          navigationBarStyle= {{ backgroundColor: '#215e79' }}
          statusBarStyle    = {{ barStyle: 'light-content', backgroundColor: '#215e79' }}
        />
      </View>
    );
  }
}

2. Switch

import { Switch } from 'native-extension';

<Switch
    height={40}
    width={300}
    activeText={`Active Text`}
    inActiveText={`InActive Text`}
    onValueChange={(value: any) => console.log(value)}
/>

3. StarRating

import { StarRating } from 'native-extension';

<StarRating
    max={5}
    initial={5}
    onChange={(rating: number) => console.log(rating)}
    selectedStar={require('../../../assets/images/icon_star.png')}
    unselectedStar={require('../../../assets/images/star_unfill.png')}
    config={{
        easing: Easing.inOut(Easing.ease),
        duration: 350,
    }}
    stagger={50}
    maxScale={1.6}
    starStyle={{
        width: 11,
        height: 11,
        margin: 1,
    }}
    editable={false}
/>

native-extension's People

Contributors

iamdylanngo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.