Comments (8)
I don't know why, but when I tested passing it via props it didn't work, then it worked on the project I'm working on. I must have done something wrong the first time.
from tamagui-kitchen-sink.
Is this on Tamagui core element Input already the case? Then it would be ideal to open a ticket in that repo
from tamagui-kitchen-sink.
Otherwise, did you try adding the props directly within the component?
const specialProps = {
backgroundColor: 'violet',
borderColor: 'blue',
color: 'red',
focusStyle: {
backgroundColor: 'green',
borderColor: 'purple',
color: 'yellow',
},
}
<TamaguiInput
{...specialProps}
/>
from tamagui-kitchen-sink.
Is this on Tamagui core element Input already the case? Then it would be ideal to open a ticket in that repo
This works in the Input from Tamagui core. The repository I created has an example with Input.
Otherwise, did you try adding the props directly within the component?
const specialProps = { backgroundColor: 'violet', borderColor: 'blue', color: 'red', focusStyle: { backgroundColor: 'green', borderColor: 'purple', color: 'yellow', }, } <TamaguiInput {...specialProps} />
That didn't work either.
from tamagui-kitchen-sink.
@dohomi Another problem that happened is that I am not able to use styled in the LmInputRhf component
from tamagui-kitchen-sink.
Both components - LmInput and LmInputRhf - are complex components. I don't think styled would be supported unless a refactor will be done, probably with the new context API introduced by Tamagui some weeks ago. I would need to see how to do it but currently won't have the time for it.
from tamagui-kitchen-sink.
Both components - LmInput and LmInputRhf - are complex components. I don't think styled would be supported unless a refactor will be done, probably with the new context API introduced by Tamagui some weeks ago. I would need to see how to do it but currently won't have the time for it.
I understand. Anyway, thank you very much for the help and for the package.
from tamagui-kitchen-sink.
Have a look at this two examples:
https://tamagui-extras.vercel.app/?path=/story/form-input--custom-focus-colors
https://tamagui-extras.vercel.app/?path=/story/form-react-hook-form--form-as-render-function
Both work perfectly fine with component props. Hope this fixes your issue.
from tamagui-kitchen-sink.
Related Issues (20)
- No native ExponentConstants module found, are you sure the expo-constants's module is linked properly? HOT 2
- isPassword pressable doesn't support RTL view HOT 4
- DateTime Picker is not taking up full space HOT 13
- LmAvatar is crashing Expo Go (Android) HOT 2
- I'm doing something wrong HOT 1
- Add helperTextProps to LmDatePicker HOT 4
- Show only one datepicker input when selecting a range. HOT 3
- LmDatepicker doesn't work on Android. HOT 4
- Button color variants HOT 2
- "RNDateTimePicker" cannot be found in UIManager HOT 5
- Sync over this project HOT 1
- Media/breakpoint specific styles HOT 5
- LmDatepicker OnChange never gets invoked in iOS ? HOT 1
- `Unable to resolve "expo-linear-gradient"` error when using <LmDateSelection/> HOT 8
- onChange doesn't get triggered for LmDatepicker on iOS and Android HOT 3
- InputRhf doesn't have error collor on label and helperText
- Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNDatePicker' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes HOT 2
- Request to Update Tamagui Dependency HOT 1
- Clarification on behaviour of `fullWidth` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tamagui-kitchen-sink.