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

Tailwind: Calendar dropdownbutton #5471

Closed
Dalorzo opened this issue Nov 30, 2023 · 6 comments · Fixed by #5483
Closed

Tailwind: Calendar dropdownbutton #5471

Dalorzo opened this issue Nov 30, 2023 · 6 comments · Fixed by #5483
Assignees
Labels
Component: Tailwind Tailwind specific issue
Milestone

Comments

@Dalorzo
Copy link
Contributor

Dalorzo commented Nov 30, 2023

dropdownbutton: ({ props }) => ({

showIcon does exist, is it missing or should be icon instead? previousButton and nextButton are missing root

  dropdownButton: {
    root: ({ props }) => ({ /*ButtonPassThroughMethodOptions*/
      className: classNames({ 'rounded-l-none': props.icon }),
    }),
  },
previousButton: {
    root: {...
    
    nextButton: {
    root: {

vs

dropdownbutton: ({ props }) => ({
            root: {
                className: classNames({ 'rounded-l-none': props.showIcon })
            }
        }),
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 30, 2023
@Dalorzo Dalorzo changed the title Tailwind: Dropdown Tailwind: Calendar dropdownbutton Nov 30, 2023
@melloware
Copy link
Member

ShowIcon exists as a prop

 /**
     * When enabled, displays a button with icon next to input.
     * @defaultValue false
     */
    showIcon?: boolean | undefined;

So props.showIcon is correct.

@melloware melloware self-assigned this Nov 30, 2023
@melloware melloware added Component: Tailwind Tailwind specific issue and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 30, 2023
@melloware melloware added this to the 10.2.2 milestone Nov 30, 2023
@melloware
Copy link
Member

Aren't increment and decrement button also missing root?

@Dalorzo
Copy link
Contributor Author

Dalorzo commented Nov 30, 2023

The props type in root is of type:

ButtonPassThroughMethodOptions

and ButtonProps does not have showIcon.

Of course I could be mistaken somewhere, however, I am getting a compilation error, since the types does not match

image

@Dalorzo
Copy link
Contributor Author

Dalorzo commented Nov 30, 2023

Aren't increment and decrement button also missing root?

he he I checked those, those are not buttonProps, yes, those are fine as they are

melloware added a commit to melloware/primereact that referenced this issue Nov 30, 2023
@melloware
Copy link
Member

@Dalorzo are these TypeScript issues or TailWind issues you seem to be confusing the two. YOu are pointing at the Tailwind index.js when you should be pointing at calendar.d.ts if that is incorrect.

@melloware
Copy link
Member

@Dalorzo can you just submit a PR since it's easier than me trying to figure out what you mean.

melloware added a commit to melloware/primereact that referenced this issue Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Tailwind Tailwind specific issue
Projects
None yet
2 participants