react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Unable to use `UNSAFE_className` on `ContextualHelp`

Open uraway opened this issue 1 year ago โ€ข 2 comments

๐Ÿ› Bug Report

UNSAFE_className is mentioned on ContextualHelp page, but user's UNSAFE_className is always overridden by built-in className.

๐Ÿค” Expected Behavior

ActionButton on ContextualHelp styles can be customized with UNSAFE_className.

๐Ÿ˜ฏ Current Behavior

https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/contextualhelp/src/ContextualHelp.tsx#L53

๐Ÿ’ Possible Solution

Like other components, it should merge user's UNSAFE_className with built-in styles.

๐Ÿ”ฆ Context

๐Ÿ’ป Code Sample

๐ŸŒ Your Environment

Software Version(s)
react-spectrum 3.21.2
Browser
Operating System

๐Ÿงข Your Company/Team

๐Ÿ•ท Tracking Issue (optional)

uraway avatar Sep 13 '22 20:09 uraway

Yep, looks like it's not applied anywhere https://codesandbox.io/s/optimistic-worker-ti0tzb?file=/src/App.js

snowystinger avatar Sep 13 '22 20:09 snowystinger

@uraway mind sharing what you are trying to accomplish with UNSAFE_className here? If this is for an Adobe product, then we wanna be careful with any styling overrides. If not, then it should be fine.

LFDanLu avatar Sep 21 '22 18:09 LFDanLu