Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for htmlAttributes (or className) parameter. #210
Unless there already is a way to add classes to the containing div, I would suggest adding support for the (pretty common) htmlAttributes parameter.
I can see this could be problematic if one should try to add an id using the htmlAttributes even if containerId is provided.
An alternative solution is to add a specific parameter className that takes a string of classes to add to the container. This is probably the most "sane" way to do it, since you probably do not want to allow other attributes than class to a React-container.
My current problem is the use of child selectors in css. Since React.NET "adds an extra element" around the component, the child selector does not work unless I add another child level in the css. I could of course rewrite my other "components" to include the extra child level in the HTML also, but adding a class to the container seems like the easier path. (If you're lazy like me... ;-) )
I will try to submit a pull request. It's my first ever, so I hope I get it right! :-)