Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] tw.variants type is not correctly inferred #114

Closed
danpacho opened this issue Aug 12, 2024 · 0 comments · Fixed by #115
Closed

[bug] tw.variants type is not correctly inferred #114

danpacho opened this issue Aug 12, 2024 · 0 comments · Fixed by #115
Assignees
Labels
bug Something isn't working

Comments

@danpacho
Copy link
Owner

Describe the bug

tw.variants is not working expected. It is not typed correctly.

Expected behavior

variants function should be typed correctly.

const t = createTools<Tailwindest>()
const box = t.variants({
   variants: {
      size: {
        xs: {
          // <---- At this part, it should access tailwindest style object properties e.g)backgroundColor etc...
        },
        sm: {}
      }
   }
})

Additional context

CreateTool's generic part is making it messy.

@danpacho danpacho added the bug Something isn't working label Aug 12, 2024
@danpacho danpacho self-assigned this Aug 12, 2024
@danpacho danpacho changed the title [bug] variants type is not correctly inferred [bug] tw.variants type is not correctly inferred Aug 12, 2024
@danpacho danpacho moved this to In Progress in tailwindest Aug 12, 2024
@danpacho danpacho linked a pull request Aug 12, 2024 that will close this issue
11 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in tailwindest Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant