Vulcan/packages/vulcan-base-components/lib/common/Logo.jsx
2017-05-03 14:42:57 +09:00

25 lines
No EOL
566 B
JavaScript

import { registerComponent } from 'meteor/vulcan:core';
import React from 'react';
import { IndexLink } from 'react-router';
const Logo = ({logoUrl, siteTitle}) => {
if (logoUrl) {
return (
<h1 className="logo-image ">
<IndexLink to={{pathname: "/"}}>
<img src={logoUrl} alt={siteTitle} />
</IndexLink>
</h1>
)
} else {
return (
<h1 className="logo-text">
<IndexLink to={{pathname: "/"}}>{siteTitle}</IndexLink>
</h1>
)
}
}
Logo.displayName = "Logo";
registerComponent('Logo', Logo);