Convert spinner to data uri (#8968)
* Convert spinner to data uri * Fix header
This commit is contained in:
parent
db18db7bfd
commit
29378fb591
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
4
packages/react-components/src/Spinner.png.ts
Normal file
4
packages/react-components/src/Spinner.png.ts
Normal file
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/app-staking authors & contributors
|
||||
// Copyright 2017-2023 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
@ -14,11 +14,6 @@ interface Props {
|
||||
variant?: 'app' | 'appPadded' | 'cover' | 'push' | 'mini';
|
||||
}
|
||||
|
||||
// prefetch
|
||||
const img = new Image();
|
||||
|
||||
img.src = spinnerSrc as string;
|
||||
|
||||
function Spinner ({ className = '', label, noLabel, variant = 'app' }: Props): React.ReactElement<Props> | null {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@ -26,7 +21,7 @@ function Spinner ({ className = '', label, noLabel, variant = 'app' }: Props): R
|
||||
<StyledSpinner className={`${className} ui--Spinner variant-${variant}`}>
|
||||
<img
|
||||
className={variant === 'push' ? '' : 'highlight--bg highlight--border'}
|
||||
src={spinnerSrc as string}
|
||||
src={spinnerSrc}
|
||||
/>
|
||||
{!noLabel && variant.startsWith('app') && <div className='text'>{label || t<string>('Retrieving data')}</div>}
|
||||
</StyledSpinner>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user