Vulcan/packages/vulcan-base-components/lib/common/Logo.jsx

25 lines
614 B
React
Raw Normal View History

2017-03-23 16:27:59 +09:00
import { registerComponent } from 'meteor/vulcan:core';
import React from 'react';
2016-06-14 10:17:11 +09:00
import { IndexLink } from 'react-router';
const Logo = ({logoUrl, siteTitle}) => {
if (logoUrl) {
2016-02-16 15:08:30 +09:00
return (
<h1 className="logo-image ">
2016-06-14 10:17:11 +09:00
<IndexLink to={{pathname: "/"}}>
<img src={logoUrl} alt={siteTitle} style={{maxWidth: "100px", maxHeight: "100px"}} />
2016-06-14 10:17:11 +09:00
</IndexLink>
2016-02-16 15:08:30 +09:00
</h1>
)
} else {
return (
2016-06-14 10:01:44 +09:00
<h1 className="logo-text">
2016-06-14 10:17:11 +09:00
<IndexLink to={{pathname: "/"}}>{siteTitle}</IndexLink>
2016-06-14 10:01:44 +09:00
</h1>
2016-02-16 15:08:30 +09:00
)
}
}
Logo.displayName = "Logo";
registerComponent('Logo', Logo);