mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: merge themes
This commit is contained in:
1 parent
0833375562
commit
80ffff322c
4 files changed
+16
-15
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
import getWN8Percentile from '../../../core/blitz/getWN8Percentile.js';
|
import getWN8Percentile from '../../../core/blitz/getWN8Percentile.js';
|
||||||
import { theme, themeTransparent } from '../../../stitches.config.js';
|
import { theme } from '../../../stitches.config.js';
|
||||||
import { RowDiscriminator } from './RowDiscriminator.js';
|
import { RowDiscriminator } from './RowDiscriminator.js';
|
||||||
import { RowStat } from './RowStat.js';
|
import { RowStat } from './RowStat.js';
|
||||||
|
|
||||||
@@ -41,10 +41,10 @@ export function Row({
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
backgroundColor: isListing
|
backgroundColor: isListing
|
||||||
? naked
|
? naked
|
||||||
? themeTransparent.colors.componentInteractive
|
? theme.colors.componentInteractive_transparent
|
||||||
: theme.colors.componentInteractive
|
: theme.colors.componentInteractive
|
||||||
: naked
|
: naked
|
||||||
? themeTransparent.colors.appBackground2
|
? theme.colors.appBackground2_transparent
|
||||||
: theme.colors.appBackground2,
|
: theme.colors.appBackground2,
|
||||||
padding: 8,
|
padding: 8,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
TANK_ICONS,
|
TANK_ICONS,
|
||||||
TANK_ICONS_PREMIUM,
|
TANK_ICONS_PREMIUM,
|
||||||
} from '../../../core/blitz/tankopedia.js';
|
} from '../../../core/blitz/tankopedia.js';
|
||||||
import { theme, themeAmber } from '../../../stitches.config.js';
|
import { theme } from '../../../stitches.config.js';
|
||||||
|
|
||||||
export interface ItemProps {
|
export interface ItemProps {
|
||||||
image?: string;
|
image?: string;
|
||||||
@@ -23,7 +23,7 @@ export function Item({ image, type, name, isPremium }: ItemProps) {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
backgroundColor: isPremium
|
backgroundColor: isPremium
|
||||||
? themeAmber.colors.componentInteractive
|
? theme.colors.componentInteractive_amber
|
||||||
: theme.colors.componentInteractive,
|
: theme.colors.componentInteractive,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -48,7 +48,7 @@ export function Item({ image, type, name, isPremium }: ItemProps) {
|
|||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
color: isPremium
|
color: isPremium
|
||||||
? themeAmber.colors.textLowContrast
|
? theme.colors.textLowContrast_amber
|
||||||
: theme.colors.textHighContrast,
|
: theme.colors.textHighContrast,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { TIER_ROMAN_NUMERALS, Tier } from '../core/blitz/tankopedia.js';
|
import { TIER_ROMAN_NUMERALS, Tier } from '../core/blitz/tankopedia.js';
|
||||||
import { themeLight } from '../stitches.config.js';
|
import { theme } from '../stitches.config.js';
|
||||||
|
|
||||||
export type TierWeightsRecord = Partial<Record<Tier, number>>;
|
export type TierWeightsRecord = Partial<Record<Tier, number>>;
|
||||||
|
|
||||||
@@ -14,9 +14,9 @@ export default function TierWeights({ weights }: TierWeightsProps) {
|
|||||||
<div
|
<div
|
||||||
key={tier}
|
key={tier}
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: themeLight.colors.appBackground1,
|
backgroundColor: theme.colors.appBackground1_light,
|
||||||
flex: weight,
|
flex: weight,
|
||||||
color: themeLight.colors.textHighContrast,
|
color: theme.colors.textHighContrast_light,
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
|||||||
@@ -3,11 +3,12 @@ import { createBorderStyles, createColors } from 'bepaint';
|
|||||||
|
|
||||||
// this isn't really a stitches config, but the object is compliant
|
// this isn't really a stitches config, but the object is compliant
|
||||||
export const theme = {
|
export const theme = {
|
||||||
colors: createColors(slateDark),
|
colors: {
|
||||||
|
...createColors(slateDark),
|
||||||
|
...createColors(slate, 'light'),
|
||||||
|
...createColors(slateDarkA, 'transparent'),
|
||||||
|
...createColors(amberDark, 'amber'),
|
||||||
|
},
|
||||||
|
|
||||||
borderStyles: createBorderStyles(slateDark),
|
borderStyles: createBorderStyles(slateDark),
|
||||||
};
|
};
|
||||||
export const themeTransparent = {
|
|
||||||
colors: createColors(slateDarkA),
|
|
||||||
};
|
|
||||||
export const themeLight = { colors: createColors(slate) };
|
|
||||||
export const themeAmber = { colors: createColors(amberDark) };
|
|
||||||
Reference in new issue
Block a user