Files
frontend-component-header/src/plugin-slots/LogoSlot/index.jsx

26 lines
715 B
JavaScript

import React from 'react';
import { PluginSlot } from '@openedx/frontend-plugin-framework';
import { Image, Hyperlink } from '@openedx/paragon';
import { getConfig } from '@edx/frontend-platform';
import andalLogo from '../../assets/complete-logo.svg';
const LogoSlot = ({ src, alt, href }) => (
<PluginSlot
id="org.openedx.frontend.layout.header_logo.v1"
idAliases={['logo_slot']}
slotOptions={{
mergeProps: true,
}}
>
<Hyperlink destination={href || getConfig().LMS_BASE_URL} className="logo">
<Image
src={src || andalLogo}
alt={alt || 'Andal Learning'}
style={{ height: '40px' }}
/>
</Hyperlink>
</PluginSlot>
);
export default LogoSlot;