-
Notifications
You must be signed in to change notification settings - Fork 134
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
[HELP WANTED] Add TypeScript Version of Existing Components #34
Comments
Hey @DavidHDev, I would like to contribute to this. Can I know what is all pending on this? , please |
@iwint most of the components are pending, besides the ones in the Text Animations. If you open the "content" folder in the project, every component there should also be in |
@DavidHDev Thanks for the clarification and I'll do the necessary changes and provide you an update. |
Hi @DavidHDev, I've noticed that the interfaces are currently duplicated in Looking forward to your thoughts. |
@iwint Interfaces are supposed to be duplicated, because using the CLI to install the components requires all the code to be in the component file/folder, so even if you were to extract the interfaces you would have to define two files for each component and keep them in their respective folders in ts-default and ts-tailwind, they can't use the same one. |
Got it @DavidHDev. Thanks for the clarification |
Hey @DavidHDev, Can I take up the |
@iwint you don't need to ask, just go for it if you have the time 🙌 |
@iwint StarBorder was just merged in by someone else |
As of now, here are the components left: Component that need TS conversion:
Components that need TS & Tailwind conversion:
Thanks everyone for the help so far, we're really close to fully supporting the library in all 4 variants 🥇 🎊 |
@DavidHDev . I'll work on |
Description
The library now supports TypeScript! But we still need to add the TypeScript code for most of the components!
Help Wanted
Two new folders have been created inside the
src
folder of the project:/ts-default
/ts-tailwind
The steps to adding full TypeScript support for any component are:
/ts-default
and/ts-tailwind
, create a new folder using the component's name (e.g: SplitText)/ts-default
, create two files:<ComponentName>.tsx
and<ComponentName>.css
- this will be theTS + CSS
version of the component/ts-tailwind
, create one file:<ComponentName>.tsx
- this will be theTS + Tailwind
version of the component/src/constants/code/<Category>/<componentName>Code.js
. In here you will have to add the following information:cliTsDefault
,cliTsTailwind
,tsCode
,tsTailwind
Please note: it's important to keep the import keys as
code
,css
,tailwind
,tsCode
,tsTailwind
!So your final updated file should look similar to this:
/demo/<Category>/<ComponentName>Demo.jsx
, update theCliInstallation
props so that it looks like the example below:Wrapping Up
That's it! When you're done, test your changes, go through all the tabs and make sure the snippets are correct, check the console for errors, and if all is well, you've successfully added the TypeScript snippets to the component!
The text was updated successfully, but these errors were encountered: