TouchableOpacity を介してネイティブに反応するカスタム ボタンを設計しています。これまで、さまざまなスタイリング アプローチを試してきましたが、必要なデザインにはなりませんでした。以下は、解決しようとする私の試みです。
<TouchableOpacity style={styles.numericButton}>
<View>
<Text style={styles.numericButtonText}>1</Text>
</View>
</TouchableOpacity>
const styles = StyleSheet.create({
numericButton: {
margin:10,
padding:10,
backgroundColor:'#D3D3D3',
borderColor:'#000',
borderWidth:2,
borderRadius:5,
elevation:10,
shadowOffset: { width: 5, height: 5 },
shadowColor: "black",
shadowOpacity: 1,
shadowRadius: 5,
},
numericButtonText:{
fontSize:24,
fontWeight:'bold',
fontFamily:'Cochin'
}
});
結果:
このように反応するネイティブボタンのスタイルを設定したい