3.1.4 • Published 5 years ago

t2s-rn-common-ui v3.1.4

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

What is this?

Common UI Utils for react native

Installation

npm i t2s-rn-common-ui --save

Usage

##Button

import {Button} from 't2s-rn-common-ui';

handleButtonClick() {
    console.log('Button is clicked!');
}

<Button
    style={styles.buttonStyle}
    disable={false}
    onPress={() => this.handleButtonClick()}
>
    SAVE
</Button>

Properties

namedescriptiontypedefault
onPressCallback method for button clickFunction-
disableButton can be enabled/disabledBooleanfalse
childrenButton TextString-
buttonStyleStyle for buttonObject-
buttonTextStyleStyle for button textObject-

##OTPView

import {OTPView} from 't2s-rn-common-ui';

<OTPView
         autoFocus={false}
         keyboardType="numeric"
         codeLength={4}
         onFulfill={(code) => this._onFinishCheckingCode1(code)}
         onCodeChange={(code) => {console.log(code)}}
/>

Properties

Customised react-native-confirmation-code-input library https://github.com/ttdung11t2/react-native-confirmation-code-input. See their docs for more info.

##Banner

import {Banner} from 't2s-rn-common-ui';

<Banner bannerText="12" bannerColor="#C73B32" />

Properties

namedescriptiontypedefault
bannerTextText for bannerString-
bannerColorColor for bannerStringgreen

##CardView

import {CardView} from 't2s-rn-common-ui';

<Banner bannerText="12" bannerColor="#C73B32" />

Properties

namedescriptiontypedefault
childrenComponents that has to be render inside cardviewNode-
cardStyleStyle for CardViewObject-

##DialogModal

import {DialogModal} from 't2s-rn-common-ui';

<DialogModal
       isVisible={this.state.showPopup}
       requestClose={() => this.setState({ showPopup: false })}
       title={'Some title here'}
       description={'Some description here'}
       positiveButtonClicked={() => {
           this.setState({ showPopup: false });
       }}
       negativeButtonClicked={() => this.setState({ showPopup: false })}
       positiveButtonText={'OK'}
       negativeButtonText={'CANCEL'}
/>
Note: By default only `positiveButtonText` is rendered. You can include `negativeButtonText` if you need it.

Properties

namedescriptiontypedefault
isVisibleBased on this prop, modal can be shown/hideBoolean-
titletitle for the modalString-
descriptioncontent for the modalString-
negativeButtonTextPositive button textString-
positiveButtonTextNegative button textString-
positiveButtonClickedCallback method for Positive buttonFunction-
negativeButtonClickedCallback method for Negative buttonFunction-
requestCloseFunction-
positiveButtonStyleStyle for Positive ButtonObject-
negativeButtonStyleStyle for Negative ButtonObject-
dialogCancelablewhether this Modal can cancelableBooleantrue
titleCenterButton TextStringtrue
                      
3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago