Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ch5790/icon comp props #100

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference path="../src/types.d.ts" />
/// <reference types="react" />
import { PinResultStatus } from "./src/utils";
import * as React from "react";
import { StyleProp, ViewStyle, TextStyle } from "react-native";
Expand Down Expand Up @@ -103,6 +102,8 @@ export declare type IProps = {
touchIDSentence?: string;
touchIDTitle?: string;
validationRegex?: RegExp;
lockedIconComponent?: any;
customBackSpaceIcon?: any;
};
export declare type IState = {
internalPinStatus: PinResultStatus;
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/ApplicationLocked.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="react" />
import { PinResultStatus } from "./utils";
import * as React from 'react';
export declare type IProps = {
Expand Down Expand Up @@ -28,6 +27,7 @@ export declare type IProps = {
styleMainContainer?: any;
styleText?: any;
styleViewButton?: any;
lockedIconComponent?: any;
};
export declare type IState = {
timeDiff: number;
Expand Down
4 changes: 1 addition & 3 deletions dist/src/ApplicationLocked.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const d3_ease_1 = require("d3-ease");
const React = require("react");
const Animate_1 = require("react-move/Animate");
const react_native_1 = require("react-native");
const MaterialIcons_1 = require("react-native-vector-icons/MaterialIcons");
class ApplicationLocked extends React.PureComponent {
constructor(props) {
super(props);
Expand Down Expand Up @@ -38,8 +37,7 @@ class ApplicationLocked extends React.PureComponent {
return (React.createElement(react_native_1.Text, { style: this.props.styleTitle ? this.props.styleTitle : styles.title }, this.props.textTitle || 'Maximum attempts reached'));
};
this.renderIcon = () => {
return (React.createElement(react_native_1.View, { style: this.props.styleViewIcon ? this.props.styleViewIcon : styles.viewIcon },
React.createElement(MaterialIcons_1.default, { name: this.props.nameIcon ? this.props.nameIcon : 'lock', size: this.props.sizeIcon ? this.props.sizeIcon : 24, color: this.props.colorIcon ? this.props.colorIcon : colors_1.colors.white })));
return (React.createElement(react_native_1.View, { style: this.props.styleViewIcon ? this.props.styleViewIcon : styles.viewIcon }, this.props.lockedIconComponent));
};
this.renderErrorLocked = () => {
const minutes = Math.floor(this.state.timeDiff / 1000 / 60);
Expand Down
4 changes: 2 additions & 2 deletions dist/src/PinCode.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="react" />
import * as React from 'react';
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
/**
Expand Down Expand Up @@ -60,6 +59,7 @@ export declare type IProps = {
titleConfirmFailed?: string;
titleValidationFailed?: string;
validationRegex?: RegExp;
customBackSpaceIcon?: any;
};
export declare type IState = {
password: string;
Expand All @@ -76,7 +76,7 @@ export declare type IState = {
export declare enum PinStatus {
choose = "choose",
confirm = "confirm",
enter = "enter",
enter = "enter"
}
declare class PinCode extends React.PureComponent<IProps, IState> {
private readonly _circleSizeEmpty;
Expand Down
11 changes: 3 additions & 8 deletions dist/src/PinCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const React = require("react");
const Animate_1 = require("react-move/Animate");
const react_native_1 = require("react-native");
const react_native_easy_grid_1 = require("react-native-easy-grid");
const MaterialIcons_1 = require("react-native-vector-icons/MaterialIcons");
var PinStatus;
(function (PinStatus) {
PinStatus["choose"] = "choose";
Expand Down Expand Up @@ -203,7 +202,7 @@ class PinCode extends React.PureComponent {
})));
};
this.renderButtonDelete = (opacity) => {
return (React.createElement(react_native_1.TouchableHighlight, { disabled: this.state.password.length === 0, underlayColor: "transparent", onHideUnderlay: () => this.setState({
return (React.createElement(react_native_1.TouchableHighlight, { activeOpacity: this.props.customBackSpaceIcon ? 0.5 : 1, disabled: this.state.password.length === 0, underlayColor: "transparent", onHideUnderlay: () => this.setState({
colorDelete: this.props.styleDeleteButtonColorHideUnderlay
? this.props.styleDeleteButtonColorHideUnderlay
: 'rgb(211, 213, 218)'
Expand All @@ -221,12 +220,8 @@ class PinCode extends React.PureComponent {
} },
React.createElement(react_native_1.View, { style: this.props.styleColumnDeleteButton
? this.props.styleColumnDeleteButton
: styles.colIcon },
!this.props.iconButtonDeleteDisabled && (React.createElement(MaterialIcons_1.default, { name: this.props.styleDeleteButtonIcon
? this.props.styleDeleteButtonIcon
: 'backspace', size: this.props.styleDeleteButtonSize
? this.props.styleDeleteButtonSize
: 30, color: this.state.colorDelete, style: { opacity: opacity } })),
: styles.colIcon }, this.props.customBackSpaceIcon ?
(!this.props.iconButtonDeleteDisabled && (this.props.customBackSpaceIcon)) :
React.createElement(react_native_1.Text, { style: [
this.props.styleDeleteButtonText
? this.props.styleDeleteButtonText
Expand Down
2 changes: 1 addition & 1 deletion dist/src/PinCodeChoose.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="react" />
import { PinStatus } from './PinCode';
import * as React from 'react';
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
Expand Down Expand Up @@ -62,6 +61,7 @@ export declare type IProps = {
titleConfirmFailed?: string;
titleValidationFailed?: string;
validationRegex?: RegExp;
customBackSpaceIcon?: any;
};
export declare type IState = {
status: PinStatus;
Expand Down
Loading