Skip to content

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

Merged
merged 1 commit into from
Jan 24, 2016
Merged

ContainerClass #211

merged 1 commit into from
Jan 24, 2016

Conversation

jovnas
Copy link
Contributor

@jovnas jovnas commented Jan 16, 2016

Add possibility to add class to container tag.

else
{
return string.Format(
"<{2} id=\"{0}\" class=\"{3}\">{1}</{2}>",
Copy link
Member

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
);

@facebook-github-bot
Copy link

@jovnas updated the pull request.

@Daniel15
Copy link
Member

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.
@jovnas
Copy link
Contributor Author

jovnas commented Jan 19, 2016

I think I got it right... Haven't really used git before. :-)

Daniel15 added a commit that referenced this pull request Jan 24, 2016
@Daniel15 Daniel15 merged commit 650d3bf into reactjs:master Jan 24, 2016
@Daniel15
Copy link
Member

Thanks!

@Daniel15
Copy link
Member

This is now available in ReactJS.NET 2.2. Thanks for your contribution!

@jovnas
Copy link
Contributor Author

jovnas commented Jan 26, 2016

Nice! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants