Comments (16)
Hi, buttonDeleteStyle
only accept style object not a component.
from react-native-pin-view.
I also tried this code but does not work.
buttonDeleteStyle={{fontSize: 16}}
from react-native-pin-view.
@hosseinpro buttonDeleteStyle is changing style of delete button not delete button text. So you can't use fontSize etc.
from react-native-pin-view.
So, do you have an example of that?
For example, how can I hide the delete button permanently?
from react-native-pin-view.
So, do you have an example of that?
For example, how can I hide the delete button permanently?
There is no special props for changing delete button text style you can use keyboardViewTextStyle but this props changing all button text styles.
keyboardViewTextStyle={{
fontSize: 11,
}}
There is no props for hiding the delete button. And I'm not adding new features 'cause I'm rewriting this package with modern practices.
from react-native-pin-view.
Thank you for the quick response.
So, can I change the color of the delete button? Do you have an example?
from react-native-pin-view.
Thank you for the quick response.
So, can I change the color of the delete button? Do you have an example?
You can change text color of buttons with keyboardViewTextStyle
also you can change deleteButton background color with buttonDeleteStyle
from react-native-pin-view.
I tested this code but it does not work:
buttonDeleteStyle={{ backgroundColor: "Green" }}
What is the problem?
from react-native-pin-view.
buttonDeleteStyle={{ backgroundColor: "Green" }}
"Green" > "green"
from react-native-pin-view.
buttonDeleteStyle={{ backgroundColor: "Green" }}
"Green" > "green"
same result. this is my code:
`<PinView
onComplete={(pass, clear) => {
clear();
this.setState({ visible: false });
this.state.onComplete(pass);
}}
pinLength={4}
delayBeforeOnComplete={0}
buttonBgColor={Colors.secondary}
buttonTextColor={Colors.secondary}
inputBgColor={Colors.primaryText}
buttonDeleteStyle={{ backgroundColor: "green" }}
/>`
from react-native-pin-view.
import React, { Component } from "react"
import { View } from "react-native"
import PinView from "react-native-pin-view"
type Props = {}
export default class Test extends Component<Props> {
constructor(props) {
super(props)
this.onComplete = this.onComplete.bind(this)
this.state = {
pin: "896745",
}
}
onComplete(inputtedPin, clear) {
if (val !== this.state.pin) {
clear()
} else {
console.log("Pin is correct")
}
}
onPress(inputtedPin, clear, pressed) {
console.log("Pressed: " + pressed)
console.log("inputtedPin: " + inputtedPin)
// clear();
}
render() {
return (
<View
style={{
flex: 1,
backgroundColor: "#f1f1f1",
justifyContent: "center",
}}>
<PinView
onPress={this.onPress}
onComplete={this.onComplete}
buttonDeleteStyle={{ backgroundColor: "green" }}
pinLength={this.state.pin.length}
// pinLength={6} // You can also use like that.
/>
</View>
)
}
}
from react-native-pin-view.
What version do you use? 2.4.1 or 2.5.0?
from react-native-pin-view.
"react-native-pin-view": "^2.5.0",
from react-native-pin-view.
Solved. I removed the "react-native-pin-view" package and installed it again.
from react-native-pin-view.
So I'm closing the issue if is K?
from react-native-pin-view.
yes. thank you.
from react-native-pin-view.
Related Issues (20)
- Pin View accepts more values than the PinLength attribute HOT 5
- [REQUEST] PinViewProps interface improvements HOT 3
- [REQUEST] HOT 3
- [REQUEST] Turn Delete from String into Icon ? HOT 2
- Custom styles for Delete button HOT 2
- getting 7 digit while entering pin while pinLength set to 6 HOT 2
- Emoji Keyboard HOT 1
- Layout on smaller screen. HOT 1
- Warning when using Icon for deleteText HOT 2
- Add extra custom button HOT 2
- Error callback is not a function HOT 6
- Hit exception "Unable to resolve "./libs/parts/KeyboardView" HOT 4
- [REQUEST] Touchable feedback HOT 1
- Font Family doesn't change in Android devices HOT 1
- buttonSize not being applied to "0" button HOT 2
- Dependency problem on react-native@"^.0.66.4" HOT 6
- onLongPress option
- TS errors for customLeftButton and customRightButton HOT 2
- Any chance of changing the fontFamily on the keypad?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-pin-view.