Skip to content

Commit

Permalink
improvement: add individual CSS classes to info items (via #5051)
Browse files Browse the repository at this point in the history
This makes it easier to style them individually or retrieve the
elements in user scripts.
  • Loading branch information
mirabilos authored and shockey committed Jan 11, 2019
1 parent b714810 commit 669ec1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/components/info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Contact extends React.Component {
const Link = getComponent("Link")

return (
<div>
<div className="info__contact">
{ url && <div><Link href={ sanitizeUrl(url) } target="_blank">{ name } - Website</Link></div> }
{ email &&
<Link href={sanitizeUrl(`mailto:${email}`)}>
Expand Down Expand Up @@ -66,7 +66,7 @@ class License extends React.Component {
let url = license.get("url")

return (
<div>
<div className="info__license">
{
url ? <Link target="_blank" href={ sanitizeUrl(url) }>{ name }</Link>
: <span>{ name }</span>
Expand Down Expand Up @@ -133,15 +133,15 @@ export default class Info extends React.Component {
</div>

{
termsOfService && <div>
termsOfService && <div className="info__tos">
<Link target="_blank" href={ sanitizeUrl(termsOfService) }>Terms of service</Link>
</div>
}

{contact && contact.size ? <Contact getComponent={getComponent} data={ contact } /> : null }
{license && license.size ? <License getComponent={getComponent} license={ license } /> : null }
{ externalDocsUrl ?
<Link target="_blank" href={sanitizeUrl(externalDocsUrl)}>{externalDocsDescription || externalDocsUrl}</Link>
<Link className="info__extdocs" target="_blank" href={sanitizeUrl(externalDocsUrl)}>{externalDocsDescription || externalDocsUrl}</Link>
: null }

</div>
Expand Down

0 comments on commit 669ec1c

Please sign in to comment.