feat(custom-logo): constraint svg logo dimensions (#1243)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import useConfig from 'hooks/useConfig';
|
||||
import { LogoImage } from './style.ee';
|
||||
|
||||
const CustomLogo = () => {
|
||||
const { config, loading } = useConfig(['logo.svgData']);
|
||||
@@ -8,7 +9,7 @@ const CustomLogo = () => {
|
||||
const logoSvgData = config['logo.svgData'] as string;
|
||||
|
||||
return (
|
||||
<img
|
||||
<LogoImage
|
||||
data-test="custom-logo"
|
||||
src={`data:image/svg+xml;utf8,${encodeURIComponent(logoSvgData)}`}
|
||||
/>
|
||||
|
8
packages/web/src/components/CustomLogo/style.ee.ts
Normal file
8
packages/web/src/components/CustomLogo/style.ee.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
export const LogoImage = styled('img')(() => ({
|
||||
maxWidth: 200,
|
||||
maxHeight: 50,
|
||||
width: '100%',
|
||||
height: 'auto',
|
||||
}));
|
Reference in New Issue
Block a user