xenial-black
xenial-black4mo ago

Swizzle bug - Edit button

Creating a new Ant Design Edit Button using swizzle causes a bug on line 105:
105 className={RefineButtonClassNames.EditButton}
105 className={RefineButtonClassNames.EditButton}
The error is the following: Cannot find name 'RefineButtonClassNames'.ts(2304) Where can I find the code for this file? I am not able to import it.
4 Replies
kapa.ai
kapa.ai4mo ago
Hi @Chrystian Ferreira. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The information extracts provided do not contain specific details about the RefineButtonClassNames or where to find the code for this file. However, you can use the swizzle command of Refine's CLI to export and customize the components of the UI integrations. This command lets you change the components at a granular level and use them in your application. You can find more information about the swizzle command in the CLI documentation (https://refine.dev/docs/packages/list-of-packages/). If you're still having trouble, I recommend checking the official Refine documentation (https://refine.dev/docs) or reaching out to the Refine community for more specific guidance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4mo ago
<@1072217596058939412> kapa.ai is still learning and improving, please let us know how it did by reacting below
xenial-black
xenial-black4mo ago
I had to access the file at /node_modules/@refinedev/ui-types/src/classNames.ts and copy the code manually. For some reason I am unable to import this file. When attempting to import it manually, I got the following error:
import { RefineButtonClassNames } from " @refinedev/ui-types/src/classNames";
// Cannot find module ' @refinedev/ui-types/src/classNames' or its corresponding type declarations.ts(2307)
import { RefineButtonClassNames } from " @refinedev/ui-types/src/classNames";
// Cannot find module ' @refinedev/ui-types/src/classNames' or its corresponding type declarations.ts(2307)
What's interesting is that this doesn't even seem to make any difference. I ended up just removing it. 🤷‍♂️
other-emerald
other-emerald4mo ago
Hello @Chrystian Ferreira could you create an issue on GitHub? We may have some issues with our swizzle configuration, and we don't copy the mentioned file to your project. cc @Alican Erdurmaz