Skip to content

Commit

Permalink
fix: #7630: Apply ToggleButton className prop to box element (#7631)
Browse files Browse the repository at this point in the history
  • Loading branch information
myigituzun authored Jan 21, 2025
1 parent 6c636cd commit 56e1583
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/lib/togglebutton/ToggleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useHandleStyle } from '../componentbase/ComponentBase';
import { useMergeProps, useMountEffect } from '../hooks/Hooks';
import { Ripple } from '../ripple/Ripple';
import { Tooltip } from '../tooltip/Tooltip';
import { DomHandler, IconUtils, ObjectUtils, classNames } from '../utils/Utils';
import { classNames, DomHandler, IconUtils, ObjectUtils } from '../utils/Utils';
import { ToggleButtonBase } from './ToggleButtonBase';

export const ToggleButton = React.memo(
Expand Down Expand Up @@ -101,7 +101,7 @@ export const ToggleButton = React.memo(
{
ref: elementRef,
id: props.id,
className: classNames(props.className, cx('root', { hasIcon, hasLabel })),
className: cx('root', { hasIcon, hasLabel }),
'data-p-highlight': props.checked,
'data-p-disabled': props.disabled
},
Expand Down Expand Up @@ -133,7 +133,7 @@ export const ToggleButton = React.memo(

const boxProps = mergeProps(
{
className: cx('box', { hasIcon, hasLabel })
className: classNames(props.className, cx('box', { hasIcon, hasLabel }))
},
ptm('box')
);
Expand Down

0 comments on commit 56e1583

Please sign in to comment.