@loomhq/lens 10.97.1 → 10.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const LogoLoaderWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, LogoLoaderProps, object>;
|
|
3
|
-
declare const LogoLoader: ({ animation, brand, }: LogoLoaderProps & React.ComponentProps<typeof LogoLoaderWrapper>) => JSX.Element;
|
|
3
|
+
declare const LogoLoader: ({ animation, brand, size, }: LogoLoaderProps & React.ComponentProps<typeof LogoLoaderWrapper>) => JSX.Element;
|
|
4
4
|
declare type LogoLoaderProps = {
|
|
5
5
|
animation?: string;
|
|
6
6
|
brand?: 'loom' | 'ai';
|
|
7
|
+
size?: 'small' | 'medium';
|
|
7
8
|
};
|
|
8
9
|
export default LogoLoader;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { LENS_CDN } from '../../constants/routes';
|
|
4
|
+
const sizeToPx = {
|
|
5
|
+
small: '40px',
|
|
6
|
+
medium: '80px',
|
|
7
|
+
};
|
|
4
8
|
const LogoLoaderWrapper = styled.span `
|
|
5
9
|
animation: ${props => props.animation};
|
|
6
10
|
background-image: url(${LENS_CDN}/${props => props.brand}-loader.svg);
|
|
7
11
|
background-size: cover;
|
|
8
12
|
background-position: left center;
|
|
9
13
|
display: block;
|
|
10
|
-
height:
|
|
11
|
-
width:
|
|
14
|
+
height: ${props => sizeToPx[props.size]};
|
|
15
|
+
width: ${props => sizeToPx[props.size]};
|
|
12
16
|
|
|
13
17
|
@keyframes spin {
|
|
14
18
|
100% {
|
|
@@ -16,7 +20,7 @@ const LogoLoaderWrapper = styled.span `
|
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
22
|
`;
|
|
19
|
-
const LogoLoader = ({ animation = 'spin 2s infinite steps(49) forwards', brand = 'loom', }) => {
|
|
20
|
-
return React.createElement(LogoLoaderWrapper, { animation: animation, brand: brand });
|
|
23
|
+
const LogoLoader = ({ animation = 'spin 2s infinite steps(49) forwards', brand = 'loom', size = 'medium', }) => {
|
|
24
|
+
return React.createElement(LogoLoaderWrapper, { animation: animation, brand: brand, size: size });
|
|
21
25
|
};
|
|
22
26
|
export default LogoLoader;
|