mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 03:29:51 +02:00
feat: removed powered by footer
This commit is contained in:
1 parent
364f97332b
commit
9e42d7e8f5
7 files changed
-61
No files matched your search
@@ -1,43 +0,0 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { theme } from '../stitches.config';
|
||||
|
||||
export enum PoweredByType {
|
||||
BlitzStars,
|
||||
Wargaming,
|
||||
}
|
||||
|
||||
export interface PoweredByProps {
|
||||
type: PoweredByType;
|
||||
footer?: ReactNode;
|
||||
}
|
||||
|
||||
const POWERED_BY_IMAGES: Record<PoweredByType, string> = {
|
||||
[PoweredByType.BlitzStars]:
|
||||
'https://www.blitzstars.com/assets/images/4b4cb591.TankyMcPewpew.png',
|
||||
[PoweredByType.Wargaming]: 'https://i.imgur.com/jADGWm0.png',
|
||||
};
|
||||
|
||||
const POWERED_BY_NAMES: Record<PoweredByType, string> = {
|
||||
[PoweredByType.BlitzStars]: 'BlitzStars',
|
||||
[PoweredByType.Wargaming]: 'Wargaming',
|
||||
};
|
||||
|
||||
export default function PoweredBy({ type, footer }: PoweredByProps) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: footer === undefined ? 'space-around' : 'space-between',
|
||||
}}
|
||||
>
|
||||
{footer !== undefined && <div style={{ display: 'flex' }}>{footer}</div>}
|
||||
|
||||
<div style={{ display: 'flex', gap: 4 }}>
|
||||
<img src={POWERED_BY_IMAGES[type]} style={{ height: 16, width: 16 }} />
|
||||
<span style={{ color: theme.colors.textLowContrast, fontSize: 16 }}>
|
||||
Powered by {POWERED_BY_NAMES[type]}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user