skip to Main Content

React Native's TouchableOpacity not taking styles by className

I'm making a custom Button component with React Native & Nativewind. But the styling doesn't work when className is applied to TouchableOpacity. Component: import {TouchableOpacity} from "react-native"; <TouchableOpacity className="border border-red" {...rest}> <View className={cn(base(), className)}> {IconLeft && <IconLeft color={icon()} />} <Text…

VIEW QUESTION

Config Tailwind in react native not working

i am new with react native and typescript. in this project i want to use the tailwind css and follow instruction at nativewind to config tailwind.config.js like this /** @type {import('tailwindcss').Config} */ module.exports = { content: [ "./App.tsx", "./src/**/*.{js,jsx,ts,tsx}", ],…

VIEW QUESTION
Back To Top
Search