1.0.67 • Published 3 years ago
able-soft-component-ui v1.0.67
able-soft-component-ui --save
Getting started
Install the library using either Yarn:
npm install npm i able-soft-component-ui --save
```javascript
import {TextInput, Login, UserIcon,TwoFactorAuthentication} from 'able-soft-component-ui';
Example
import React from 'react';
import {useState} from 'react';
import {View, Platform, UIManager} from 'react-native';
import {TextInput, Login, UserIcon,TwoFactorAuthentication} from 'able-soft-component-ui';
const App = () => {
const [authShown, showAuth] = useState(false);
const [authArray, setAuthArray] = useState(false);
if (
Platform.OS === 'android' &&
UIManager.setLayoutAnimationEnabledExperimental
) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
const LoginReq = async () => {
return new Promise((resolve) =>
setTimeout(function () {
resolve('show_auth');
setAuthArray();
}, 3000),
);
};
const showAuthWindowNext = () => {
showAuth(true);
};
const sendCodeToValue = (value) => {
console.log('sendCodeToValue', value);
return new Promise((resolve) =>
setTimeout(function () {
resolve('success');
setAuthArray();
}, 3000),
);
};
const checkAuthCode = (value) => {
return new Promise((resolve) =>
setTimeout(function () {
resolve('code_success');
setAuthArray();
}, 3000),
);
};
const AuthSuccess = () => {
alert('amjilttai_nevterlee');
};
//Array example
const testArray = [
{type: 'email',value: 'able@gmail.com'},
{type: 'phone',value: '88891803'},
{type: 'phone',value: '99888888'},
];
return (
<View style={{flex: 1, backgroundColor: 'white', justifyContent: 'center'}}>
{authShown ? (
<TwoFactorAuthentication
array={authArray}
path={
'https://storage.able.mn/main.php?g=bG9ZhEltYWdl&path=dXNlckl4b2jvbDIwMzU5NzguanBn&accessToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJteUhJRCI6MjAzNTk3OCwibXlDb21JZCI6Miwia2V5IjoiYWJsZXNvZnQiLCJicm93c2VyIjoiQ2hyb21lIiwiYnJvd3NlclZlciI6Ijg3LjAuNDI4MC44OCIsIm9zIjoiTWFjIE9TIFgiLCJvc1R5cGUiOm51bGwsImxvY2F0aW9uIjoiVWxhbiBCYXRvcixNTig0Ny45MDc3LDEwNi44ODMyKSIsImNsaWVudElQIjoiMTUwLjEyOS4xNDMuMTc0IiwiY2xpZW50VHlwZSI6IndlYiIsInNjcmVlbldpZHRoIjoxMjgwLCJzY3JlZW5IZWlnaHQiOjgwMCwiaWF0IjoxNjA5OTg4Mjk4fQ.0OmrPimv7gWzdP7z4hcUyKgSodusB_ZYbufycNBluF0&cloudDir=1'
}
goBack={() => showAuth(false)}
hideAuthWindow={() => showAuth(false)}
sendCodeToValue={sendCodeToValue}
checkAuthCode={checkAuthCode}
AuthSuccess={AuthSuccess}
array={testArray}
/>
) : (
<Login
activeIconColor={'green'}
activeBorderColor={'green'}
inActiveIconColor={'red'}
inActiveBorderColor={'red'}
inActiveBorderHeight={2}
activeBorderHeight={5}
buttonStyle={{width: '80%'}}
inputStyle={{width: '80%'}}
onPressLogin={() => LoginReq(true)}
showAuthWindow={true}
showAuthWindowNext={() => {
showAuthWindowNext();
}}
/>
)}
</View>
);
};
export default App;
Reference
Methods
Parameters
Name | Type | Required | Description |
---|---|---|---|
content | string | Yes | The content to be stored in the clipboard |
1.0.66
3 years ago
1.0.67
3 years ago
1.0.39
3 years ago
1.0.38
3 years ago
1.0.62
3 years ago
1.0.40
3 years ago
1.0.61
3 years ago
1.0.60
3 years ago
1.0.63
3 years ago
1.0.41
3 years ago
1.0.55
3 years ago
1.0.54
3 years ago
1.0.53
3 years ago
1.0.52
3 years ago
1.0.59
3 years ago
1.0.58
3 years ago
1.0.57
3 years ago
1.0.56
3 years ago
1.0.35
3 years ago
1.0.34
3 years ago
1.0.33
3 years ago
1.0.29
3 years ago
1.0.32
3 years ago
1.0.31
3 years ago
1.0.30
3 years ago
1.0.28
3 years ago
1.0.27
3 years ago
1.0.26
3 years ago
1.0.25
3 years ago
1.0.24
3 years ago
1.0.23
3 years ago
1.0.22
3 years ago
1.0.21
3 years ago
1.0.20
3 years ago
1.0.19
3 years ago
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.11
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago