Repository URL to install this package:
|
Version:
3.11.1 ▾
|
import React from 'react';
import PropTypes from 'prop-types';
import DoodleLogo from '../DoodleLogo';
const LogoLink = ({ logoUrl, redirectUrl }) => (
<a href={redirectUrl || '/'} aria-label="Logo" className="LogoLink">
{logoUrl ? <img alt="Logo" className="LogoLink-image" src={logoUrl} /> : <DoodleLogo />}
</a>
);
LogoLink.propTypes = {
/** The url of the logo to be displayed */
logoUrl: PropTypes.string,
/** Where the logo click will lead to. Default is root */
redirectUrl: PropTypes.string,
};
LogoLink.defaultProps = {
logoUrl: '',
redirectUrl: '',
};
export default LogoLink;