|
|
@ -1,5 +1,5 @@ |
|
|
|
import React from "react"; |
|
|
|
import React from "react"; |
|
|
|
import { Appearance } from "react-native"; |
|
|
|
import { connect } from "react-redux"; |
|
|
|
import Svg, { Path } from "react-native-svg"; |
|
|
|
import Svg, { Path } from "react-native-svg"; |
|
|
|
import SelectDropdown from "react-native-select-dropdown"; |
|
|
|
import SelectDropdown from "react-native-select-dropdown"; |
|
|
|
|
|
|
|
|
|
|
@ -11,22 +11,20 @@ function Select({ |
|
|
|
options, |
|
|
|
options, |
|
|
|
onChange, |
|
|
|
onChange, |
|
|
|
name, |
|
|
|
name, |
|
|
|
value, |
|
|
|
|
|
|
|
width, |
|
|
|
width, |
|
|
|
defaultValue, |
|
|
|
defaultValue, |
|
|
|
|
|
|
|
theme, |
|
|
|
}) { |
|
|
|
}) { |
|
|
|
const colorScheme = Appearance.getColorScheme(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<SelectDropdown |
|
|
|
<SelectDropdown |
|
|
|
data={options} |
|
|
|
data={options} |
|
|
|
buttonStyle={{ |
|
|
|
buttonStyle={{ |
|
|
|
width: width, |
|
|
|
width: width, |
|
|
|
borderWidth: 1, |
|
|
|
borderWidth: 1, |
|
|
|
borderColor: Colors.theme1[colorScheme].gray2077 + "66", |
|
|
|
borderColor: Colors.theme1[theme].gray2077 + "66", |
|
|
|
borderRadius: 2, |
|
|
|
borderRadius: 2, |
|
|
|
height: 48, |
|
|
|
height: 48, |
|
|
|
backgroundColor: 'white', |
|
|
|
backgroundColor: "white", |
|
|
|
fontFamily: "regular", |
|
|
|
fontFamily: "regular", |
|
|
|
}} |
|
|
|
}} |
|
|
|
rowTextStyle={{ |
|
|
|
rowTextStyle={{ |
|
|
@ -40,7 +38,7 @@ function Select({ |
|
|
|
justifyContent: "flex-end", |
|
|
|
justifyContent: "flex-end", |
|
|
|
flex: 0, |
|
|
|
flex: 0, |
|
|
|
fontSize: fontSize.tiny, |
|
|
|
fontSize: fontSize.tiny, |
|
|
|
color: Colors.theme1[colorScheme].gray2077, |
|
|
|
color: Colors.theme1[theme].gray2077, |
|
|
|
fontFamily: "regular", |
|
|
|
fontFamily: "regular", |
|
|
|
// display: 'inline'
|
|
|
|
// display: 'inline'
|
|
|
|
}} |
|
|
|
}} |
|
|
@ -58,7 +56,7 @@ function Select({ |
|
|
|
<Path |
|
|
|
<Path |
|
|
|
d="m13.347 5.997-4.368 4.369a1.331 1.331 0 0 1-1.876 0L2.734 5.997" |
|
|
|
d="m13.347 5.997-4.368 4.369a1.331 1.331 0 0 1-1.876 0L2.734 5.997" |
|
|
|
fill="none" |
|
|
|
fill="none" |
|
|
|
stroke={Colors.theme1[colorScheme].gray2077 + "66"} |
|
|
|
stroke={Colors.theme1[theme].gray2077 + "66"} |
|
|
|
strokeLinecap="round" |
|
|
|
strokeLinecap="round" |
|
|
|
strokeLinejoin="round" |
|
|
|
strokeLinejoin="round" |
|
|
|
strokeWidth={1.5} |
|
|
|
strokeWidth={1.5} |
|
|
@ -69,7 +67,11 @@ function Select({ |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default Select; |
|
|
|
const mapStateToProps = (state) => ({ |
|
|
|
|
|
|
|
theme: state.publicApi.theme, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps)(Select); |
|
|
|
|
|
|
|
|
|
|
|
Select.defaultProps = { |
|
|
|
Select.defaultProps = { |
|
|
|
options: ["1", "2", "3"], |
|
|
|
options: ["1", "2", "3"], |
|
|
|