How to apply material-ui styles for TextFields - react-admin

How can i change the syle of the reat react-admin's TextField to have the same style of material-ui's Outlined textFields :
https://material-ui.com/demos/text-fields/#outlined
Thanks

Related

How do you right align headerTitle in react navigation?

I'm trying to right align my header title in my react native app but can't seem to do so. In react navigation, you can set headerTitleAlign prop only to center and left. I try to use headerRight and remove headerTitle but the default title kicks in which is the name of the screen.
Had a search online but no answers has cropped up.
Wrap your header inside a view. And pass this style ={{alignItems: 'flex-end', alignContents: 'flex-end'}}

How to change UI Kitten React Native Datepicker background and border colour while using it in React Hook Form Controller without touching the theme?

I am trying to change the colour of the UI Kitten Datepicker's background & border colour without touching the global theme.
I am also using the Datepicker in React Hook Form Controller which seems to not like the Datepicker, however, all other functionality from the Datepicker as worked so far inside it.
No luck so far with using a StyleSheet component both with backdropStyle & style.
What I have so far:
<Controller
as={Datepicker}
control={control}
name="date"
defaultValue={date}
onSelect={(date: any) => setDatePicker(date)}
date={dateSearched}
accessoryLeft={CalendarIcon}
accessoryRight={resetFormInput}
backdropStyle={styles.input}
style={styles.input}
/>

How can I change text color of items in safe area in React Native?

I am trying to change the color of text and other icons in SafeAreaView (check this Screenshot) based on theme in react-native-ui-kitten. I tried setting color in stylesheet but no good.
You could try Status bar's props barStyle like this:
import { StatusBar } from 'react-native';
...
<StatusBar barStyle="light-content" /> //or "dark-content"
...
DOC example
I think you should use StatusBar - a react native base component to change your item color.
https://reactnative.dev/docs/statusbar#barstyle

How to make the entire TouchableOpacity clickable while has other components inside?

I have a component that is basically a TouchableOpacity with a few TextInputs wrapped inside.
It has two states: expanded and unExpanded. When it's unExpanded, the TextInputs are disabled, and by clicking the TouchableOpacity it transits to the expanded state, where TouchableOpacity is disabled and TextInputs are editable.
However, the disabled TextInputs are taking away the clicks. TouchableOpacity is only clickable in the empty space. How can I make the entire TouchableOpacity to be clickable?
There is a prop in react-native that controls whether or not a View can be the target of touch events. Give your disabled TextInput's pointerEvents={'none'} prop like this;
<TextInput pointerEvents={'none'} />

How to customize the border-size of Button component in NativeBase?

I have been using NativeBase for my React Native project.
I can use inline styling to increase the border size of the <Button /> component. Is there any way to style all the buttons used from NativeBase?
If you have a look at this file https://github.com/GeekyAnts/NativeBase/blob/master/Components/Widgets/Button.js
The style of the TouchableHighlight component is set using the method prepareRootProps
Which has borderWidth: (this.props.bordered) ? 1 : 0,
So if you did <Button bordered=true />. It will set the borderWidth to 1. However it doesn't seem like it allows to define your own width.