-
Notifications
You must be signed in to change notification settings - Fork 926
ContainerClass #211
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
ContainerClass #211
Conversation
else | ||
{ | ||
return string.Format( | ||
"<{2} id=\"{0}\" class=\"{3}\">{1}</{2}>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than having two separate branches here, it might be worth having a list of attributes
Something like (not tested):
var attributes = id=\"" + ContainerId + "\";
if (!string.IsNullOrEmpty(ContainerClass))) {
attributes += " class=\"" + ContainerClass + "\"";
}
return string.Format(
"<{2} {0}>{1}</{2}>",
attributes,
html,
ContainerTag
);
@jovnas updated the pull request. |
Thanks! This looks reasonable to me. Could you please squash your commits, and then I'll merge this :) |
Add possibility to add class to container tag.
I think I got it right... Haven't really used git before. :-) |
Thanks! |
This is now available in ReactJS.NET 2.2. Thanks for your contribution! |
Nice! Thank you! |
Add possibility to add class to container tag.