Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
v3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
talut committed Dec 25, 2020
2 parents 0e236a4 + 64fb94f commit 9305229
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Easy, convenient, quick-forming PinView component. It runs smoothly for both IOS and Android, and has only keyboard and input.

## v3.0.1 Released with more powerful features
## v3.* Released with more powerful features

##### BEWARE! This version has a lot of breaking changes.

Expand Down
12 changes: 8 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const ViewButton = ({
<View
style={[
PinViewStyle.buttonView,
customViewStyle,
{ width: buttonSize, height: buttonSize, borderRadius: buttonSize / 2 },
customViewStyle,
]}>
{customComponent ? (
customComponent
Expand All @@ -53,9 +53,9 @@ const ViewInput = ({
<View
style={[
PinViewStyle.inputView,
customStyle,
{ width: size, height: size, borderRadius: size / 2, alignItems: "center", justifyContent: "center" },
text ? inputFilledStyle : inputEmptyStyle,
customStyle,
]}>
<Text style={[PinViewStyle.inputText, inputTextStyle]}>{text}</Text>
</View>
Expand All @@ -65,9 +65,9 @@ const ViewInput = ({
<View
style={[
PinViewStyle.inputView,
customStyle,
{ width: size, height: size, borderRadius: size / 2 },
text ? inputFilledStyle : inputEmptyStyle,
customStyle,
]}
/>
)
Expand Down Expand Up @@ -108,6 +108,8 @@ const PinView = React.forwardRef(
customRightButtonViewStyle,
customLeftButtonDisabled,
customRightButtonDisabled,
customLeftButtonSize = 60,
customRightButtonSize = 60,
},
ref
) => {
Expand All @@ -134,7 +136,7 @@ const PinView = React.forwardRef(

useEffect(() => {
if (onValueChange!==undefined){
onValueChange(input)
onValueChange(input)
}
}, [input])

Expand Down Expand Up @@ -268,6 +270,7 @@ const PinView = React.forwardRef(
text={buttonTextByKey.zero}
customTextStyle={buttonTextStyle}
customViewStyle={buttonViewStyle}
buttonSize={customLeftButtonSize}
/>
{customRightButton !== undefined ? (
<ViewButton
Expand All @@ -278,6 +281,7 @@ const PinView = React.forwardRef(
onButtonPress={() => onButtonPress("custom_right")}
customViewStyle={customRightButtonViewStyle}
customComponent={customRightButton}
buttonSize={customRightButtonSize}
/>
) : (
<ViewHolder />
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"PinView"
],
"peerDependencies": {
"react-native": "0.62.2"
"react-native": "^0.63.4"
},
"main": "index.js",
"types": "react-native-pin-view.d.ts",
Expand Down

0 comments on commit 9305229

Please sign in to comment.