mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-04-27 15:37:57 +00:00
feat: initial Pezkuwi Apps rebrand from polkadot-apps
Rebranded terminology: - Polkadot → Pezkuwi - Kusama → Dicle - Westend → Zagros - Rococo → PezkuwiChain - Substrate → Bizinikiwi - parachain → teyrchain Custom logos with Kurdistan brand colors (#e6007a → #86e62a): - bizinikiwi-hexagon.svg - sora-bizinikiwi.svg - hezscanner.svg - heztreasury.svg - pezkuwiscan.svg - pezkuwistats.svg - pezkuwiassembly.svg - pezkuwiholic.svg
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
// Copyright 2017-2025 @pezkuwi/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import spinnerSrc from './Spinner.png.js';
|
||||
import { styled } from './styled.js';
|
||||
import { useTranslation } from './translate.js';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
label?: React.ReactNode;
|
||||
noLabel?: boolean;
|
||||
variant?: 'app' | 'appPadded' | 'cover' | 'push' | 'mini';
|
||||
}
|
||||
|
||||
function Spinner ({ className = '', label, noLabel, variant = 'app' }: Props): React.ReactElement<Props> | null {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<StyledSpinner className={`${className} ui--Spinner variant-${variant}`}>
|
||||
<img
|
||||
className={variant === 'push' ? '' : 'highlight--bg highlight--border'}
|
||||
src={spinnerSrc}
|
||||
/>
|
||||
{!noLabel && variant.startsWith('app') && <div className='text'>{label || t('Retrieving data')}</div>}
|
||||
</StyledSpinner>
|
||||
);
|
||||
}
|
||||
|
||||
const StyledSpinner = styled.div`
|
||||
display: block;
|
||||
line-height: 1rem;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
|
||||
&.variant-appPadded {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 1px solid transparent;
|
||||
border-radius: 10rem;
|
||||
}
|
||||
|
||||
&.variant-cover {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
||||
img {
|
||||
border: 1 px solid white;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: inherit !important;
|
||||
margin: 0.25rem auto 1.5rem auto;
|
||||
opacity: var(--opacity-light);
|
||||
|
||||
div+div {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default React.memo(Spinner);
|
||||
Reference in New Issue
Block a user