Open janstrohbeck opened 7 years ago
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 @types/react
and @types/react-native
to dependencies (which I forgot in my original commit). Should I rebase my PR to the latest master and make those additions?
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... If they should be in the PropTypes, I can also add them in this PR.
@janstrohbeck
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.