-
Notifications
You must be signed in to change notification settings - Fork 366
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
fix(classNames context): general improvements #771
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5d4a324:
|
Greate! Just have time to work with this issue and see your PR, the API looks similar as I imagine, can't wait for the new release. |
Hey @Jokcy, thanks! Do you have any feedback? Not absolute sure about the API, but at least it is very strict and it was able to find many places where Sandpack was missing classNames. // I specially didn't like of this pattern
classNames("sandpack-class-1", [
classNames("sandpack-class-2"),
classNames("sandpack-class-3"),
"another-class",
"another-class-2",
] |
Hi @danilowoz , I used to try to keep the traditional import { classNames } from "../utils/classNames";
import { useClassNames} from "../utils/useClassNames";
const classNamesWithPrefix = useClassNames()
<div className={classNames(
classNamesWithPrefix('sandpack-class-1', ...classNeedPrefix),
buttonClassName,
...classesWithoutPrefix)}>
</div> The only difference is it try to fit the api of But since we implement |
@danilowoz Any plan to merge this PR? |
As I will be off for a couple of weeks, I don't want to introduce any disruptive change. Let's get this done as soon as I am back. |
Closes #714