diff --git a/components/lib/checkbox/Checkbox.css b/components/lib/checkbox/Checkbox.css index 3b85c81554..f8331b43e3 100644 --- a/components/lib/checkbox/Checkbox.css +++ b/components/lib/checkbox/Checkbox.css @@ -6,6 +6,10 @@ position: relative; } +.p-checkbox.p-checkbox-disabled { + cursor: auto; +} + .p-checkbox-box { display: flex; justify-content: center; diff --git a/components/lib/multistatecheckbox/MultiStateCheckbox.js b/components/lib/multistatecheckbox/MultiStateCheckbox.js index 4d4a84a2bd..46930b96b8 100644 --- a/components/lib/multistatecheckbox/MultiStateCheckbox.js +++ b/components/lib/multistatecheckbox/MultiStateCheckbox.js @@ -115,7 +115,7 @@ export const MultiStateCheckbox = React.memo( const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip); const otherProps = ObjectUtils.findDiffKeys(props, MultiStateCheckbox.defaultProps); const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS); - const className = classNames('p-multistatecheckbox p-checkbox p-component', props.className); + const className = classNames('p-multistatecheckbox p-checkbox p-component', props.className, { 'p-checkbox-disabled': props.disabled }); const boxClassName = classNames( 'p-checkbox-box', { diff --git a/components/lib/tristatecheckbox/TriStateCheckbox.js b/components/lib/tristatecheckbox/TriStateCheckbox.js index dba4220eb5..5fe8da73f5 100644 --- a/components/lib/tristatecheckbox/TriStateCheckbox.js +++ b/components/lib/tristatecheckbox/TriStateCheckbox.js @@ -59,7 +59,7 @@ export const TriStateCheckbox = React.memo( const hasTooltip = ObjectUtils.isNotEmpty(props.tooltip); const otherProps = ObjectUtils.findDiffKeys(props, TriStateCheckbox.defaultProps); const ariaProps = ObjectUtils.reduceKeys(otherProps, DomHandler.ARIA_PROPS); - const className = classNames('p-tristatecheckbox p-checkbox p-component', props.className); + const className = classNames('p-tristatecheckbox p-checkbox p-component', props.className, { 'p-checkbox-disabled': props.disabled }); const boxClassName = classNames('p-checkbox-box', { 'p-highlight': (props.value || !props.value) && props.value !== null, 'p-disabled': props.disabled,