Comments (1)
I'm sure you've found an alternative, which I'm curious to hear so post it here if you can, but here's how I got it working.
- In the node_modules folder, make a folder called 'react-native-horizontal-scroll-picker'
- download all the code in this repository and paste it in that folder
- in the file you want to use it in, import the way it's detailed:
import {HorizontalScrollPicker} from 'react-native-horizontal-scroll-picker';
import _ from 'lodash';
- just use it and edit the styles as you want
...
<HorizontalScrollPicker
items={emoNumItems}
textStyle={styles.emoSelect}
selectedTextStyle={styles.emoSelected}
containerStyle={styles.scrollPickerContainer}
itemStyle={styles.item}
selectorStyle={styles.selectedItem}
onSelect={(selectI) => this.setState({selectedItem: selectI})}
initialIdx={0}
/>
...
const styles = StyleSheet.create({
item: {
textAlign: 'center',
textAlignVertical: 'center',
color: '#000',
fontSize: 18,
},
selectedItem: {
flex: 1,
position: 'absolute',
top: 0,
backgroundColor: 'transparent',
borderWidth: 0, //indicator line
borderColor: '#000',
borderRadius: 12,
},
emoSelect: {
fontFamily: 'AGaramondPro-Regular',
},
emoSelected: {
fontFamily: 'AGaramondPro-Regular',
fontWeight: 'bold',
},
});
I changed up the default values a bit for myself so you can just interpret my changes from the original given code.
from react-native-horizontal-scroll-picker.
Related Issues (3)
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-horizontal-scroll-picker.