You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Panel component doesn't passthrough the props.className value.
So within the Panel.js the line 247: className: cx('root')
has to be something like: className: classNames(props.className, cx('root')),
EDIT
Just had a further look and it seems I missunderstood the code and thought my proposed solution which is taken from Button.js is required, but for example the panel content also only has className: cx('content') which in this case does apply the custom classes set within a passthrough object. So I'm confused when to use the passthrough like the button does and when the cx() is enough, but the Panel component doesn't apply the custom classes which needs to be fixed.
habubey
added
Core Team
Issue or pull request has been *opened* by a member of Core Team
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Oct 12, 2023
Describe the bug
Currently the Panel component doesn't passthrough the props.className value.
So within the Panel.js the line 247:
className: cx('root')
has to be something like:
className: classNames(props.className, cx('root')),
EDIT
Just had a further look and it seems I missunderstood the code and thought my proposed solution which is taken from Button.js is required, but for example the panel content also only has
className: cx('content')
which in this case does apply the custom classes set within a passthrough object. So I'm confused when to use the passthrough like the button does and when the cx() is enough, but the Panel component doesn't apply the custom classes which needs to be fixed.Reproducer
https://codesandbox.io/s/primereact-test-forked-tdzs9g
PrimeReact version
10.0.3
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
<Panel className="test" />
Expected behavior
Panel dom with added className's
The text was updated successfully, but these errors were encountered: