Giter VIP home page Giter VIP logo

Comments (8)

tjapa avatar tjapa commented on June 4, 2024 1

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.

dohomi avatar dohomi commented on June 4, 2024

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.

dohomi avatar dohomi commented on June 4, 2024

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.

tjapa avatar tjapa commented on June 4, 2024

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.

tjapa avatar tjapa commented on June 4, 2024

@dohomi Another problem that happened is that I am not able to use styled in the LmInputRhf component

from tamagui-kitchen-sink.

dohomi avatar dohomi commented on June 4, 2024

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.

tjapa avatar tjapa commented on June 4, 2024

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.

dohomi avatar dohomi commented on June 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.