-
Notifications
You must be signed in to change notification settings - Fork 40
Add Typescript definition file. #10
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for this and sorry for the delay. I haven't worked on this for some months. I've just made a fix to one of the PropTypes definitions, so I'll have to fix it in your PR and include it. I've made major enhancements including introduction of a stateful and optional Grid root for better abstraction around layout state and just made this demo here: https://www.youtube.com/watch?v=QyIRoKinyLU (source code linked in Readme) Given I've not used TypeScript, is there anything I have to do (in package.json or otherwise) besides including the definition file in the root folder? |
Yes, you need to add a "types" entry in package.json (like in my commit), as well as add |
Yes, please. That would be awesome! Thank you. Will add Contributors.md later today.. |
Ok, I updated the definition file to the one that I use in my project. I added the Grid component and the necessary dependencies. I also added some props that I think are missing in the PropTypes, like size and sizePoints at the Row component. Is that correct? They are mentioned in the Readme file, but not validated via PropTypes... |
Also added dependencies to type definitions of react and react-native.
Row is actually missing more of those {
size,
smSize,
mdSize,
lgSize,
xlSize,
sizePoints,
smSizePoints,
mdSizePoints,
lgSizePoints,
xlSizePoints,
} All of these are valid and need to have corresponding PropTypes. Thank you for noticing that. So, yes, would be great to add this list of props to the PR. One note on the original PR, there was an issue #11 in the PropTypes for Row component, and I'm not sure that got incorporated in your latest. |
This adds a definition file for easier integration with Typescript projects.