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

Checkbox and TriStateCheckbox context do not include focus properties #113

Closed
adambergman opened this issue Feb 6, 2024 · 1 comment
Closed

Comments

@adambergman
Copy link

The tailwind themes reference context.focus but that property is not included in CheckboxContext or TriStateCheckboxContext. This is leading to typescript errors.

I'm not sure if the context type were meant to extend another interface that supplies focused and this is an issue with the core package's definitions or if the theme being implemented using a property on the context that doesn't exist.

Checkbox

'ring-2 ring-primary-500 dark:ring-primary-400': !props.disabled && context.focused,

export interface CheckboxContext {
    /**
     * Current checked state of the item as a boolean.
     * @defaultValue false
     */
    checked: boolean;
    /**
     * Current disabled state of the item as a boolean.
     * @defaultValue false
     */
    disabled: boolean;
}

https://github.com/primefaces/primevue/blob/f24b20d5318e7e4012fc4e039fec2057ac540b1b/components/lib/checkbox/Checkbox.d.ts#L193-L204

TriStateCheckbox

'ring-2 ring-primary-500 dark:ring-primary-400': !props.disabled && context.focused,

export interface TriStateCheckboxContext {
    /**
     * Current active state as a boolean.
     * @defaultValue false
     */
    active: boolean;
    /**
     * Current disabled state as a boolean.
     * @defaultValue false
     */
    disabled: boolean;
}

https://github.com/primefaces/primevue/blob/f24b20d5318e7e4012fc4e039fec2057ac540b1b/components/lib/tristatecheckbox/TriStateCheckbox.d.ts#L108-L119

@mertsincan
Copy link
Member

Hi,

We removed the focused params from context. primefaces/primevue#5071 And we updated our preset in the next version. We'll release it asap.

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants