yuanfux / expo-hsv-color-picker Goto Github PK
View Code? Open in Web Editor NEWan Expo HSV(hue, saturation, value) color picker
an Expo HSV(hue, saturation, value) color picker
Doesn't seem to work on SDK 45.
Created a component with the code from react-native-hsv-color-picker, only replacing the import of HsvColorPicker
(code below), and I get this error (below code).
Not working in snack either.
import React from 'react';
import { StyleSheet, View } from 'react-native';
import HsvColorPicker from 'expo-hsv-color-picker';
export default class Example extends React.Component {
constructor(props) {
super(props);
this.state = {
hue: 0,
sat: 0,
val: 1,
};
this.onSatValPickerChange = this.onSatValPickerChange.bind(this);
this.onHuePickerChange = this.onHuePickerChange.bind(this);
}
onSatValPickerChange({ saturation, value }) {
this.setState({
sat: saturation,
val: value,
});
}
onHuePickerChange({ hue }) {
this.setState({
hue,
});
}
render() {
const { hue, sat, val } = this.state;
return (
<View style={styles.container}>
<HsvColorPicker
huePickerHue={hue}
onHuePickerDragMove={this.onHuePickerChange}
onHuePickerPress={this.onHuePickerChange}
satValPickerHue={hue}
satValPickerSaturation={sat}
satValPickerValue={val}
onSatValPickerDragMove={this.onSatValPickerChange}
onSatValPickerPress={this.onSatValPickerChange}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Errors:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `SaturationValuePicker`.
This error is located at:
in TouchableWithoutFeedback (created by SaturationValuePicker)
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `HuePicker`.
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `SaturationValuePicker`.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.