mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: merged powered by
This commit is contained in:
1 parent
64fd15c0a5
commit
dd39563d6d
10 files changed
+53
-46
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { ReactNode } from 'react';
|
||||
import { theme } from '../stitches.config.js';
|
||||
|
||||
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: 'space-between' }}>
|
||||
<div>{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>
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import { theme } from '../stitches.config.js';
|
||||
|
||||
export default function PoweredByBlitzStars() {
|
||||
return (
|
||||
<div style={{ display: 'flex', gap: 4, justifyContent: 'flex-end' }}>
|
||||
<img
|
||||
src="https://www.blitzstars.com/assets/images/4b4cb591.TankyMcPewpew.png"
|
||||
style={{ height: 16, width: 16 }}
|
||||
/>
|
||||
<span style={{ color: theme.colors.textLowContrast, fontSize: 16 }}>
|
||||
Powered by BlitzStars
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import { theme } from '../stitches.config.js';
|
||||
|
||||
export default function PoweredByWargaming() {
|
||||
return (
|
||||
<div style={{ display: 'flex', gap: 4, justifyContent: 'flex-end' }}>
|
||||
<img
|
||||
src="https://i.imgur.com/jADGWm0.png"
|
||||
style={{ height: 16, width: 16 }}
|
||||
/>
|
||||
<span style={{ color: theme.colors.textLowContrast, fontSize: 16 }}>
|
||||
Powered by Wargaming
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user