I am using react native elements library to build a UI. I am trying to create a button with an icon. I initially just copied this code from the website without any changes to see if the button works.
import { Button } from "@rneui/themed";
<Button
title="Basic Button"
buttonStyle={{
backgroundColor: 'rgba(78, 116, 289, 1)',
borderRadius: 3,
}}
containerStyle={{
width: 200,
marginHorizontal: 50,
marginVertical: 10,
}}
/>
I keep getting this error in the app
TypeError: undefined is not an object (evaluating 'theme.spacing[radius]')
which comes from inside Button.js that comes with the ui.library. I am not sure what could be causing this. I managed to use the input component from the library without any issues and from that I would assume I installed it properly. What could be causing this button problem then?
CodePudding user response:
why you don't create button with touchOpacity and icon it easier than you use library