mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
fix: tank name colors
This commit is contained in:
1 parent
94623c43eb
commit
27cfc225de
1 file changed
+15
-13
@@ -1,3 +1,4 @@
|
|||||||
|
import { amberDark, blueDark } from '@radix-ui/colors';
|
||||||
import { Flex, Text } from '@radix-ui/themes';
|
import { Flex, Text } from '@radix-ui/themes';
|
||||||
import { times } from 'lodash';
|
import { times } from 'lodash';
|
||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
@@ -37,8 +38,6 @@ interface BreakdownEmbedCardProps {
|
|||||||
export function BreakdownEmbedCard({ tank }: BreakdownEmbedCardProps) {
|
export function BreakdownEmbedCard({ tank }: BreakdownEmbedCardProps) {
|
||||||
const { useState, useRichText } =
|
const { useState, useRichText } =
|
||||||
useEmbedStateCurry<typeof breakdownConfig>();
|
useEmbedStateCurry<typeof breakdownConfig>();
|
||||||
const { color: cardTitleColor, ...restCardTitleProps } =
|
|
||||||
useState('cardTitle');
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
@@ -57,18 +56,21 @@ export function BreakdownEmbedCard({ tank }: BreakdownEmbedCardProps) {
|
|||||||
p={useState('cardHeaderPadding')}
|
p={useState('cardHeaderPadding')}
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
{...{
|
||||||
color: useState('cardTitleTypeColor')
|
...useRichText('cardTitle'),
|
||||||
? tank === null
|
style:
|
||||||
? cardTitleColor
|
tank === null
|
||||||
: tank.treeType === 'collector'
|
? undefined
|
||||||
? 'blue'
|
: tank.treeType === 'researchable' ||
|
||||||
: tank.treeType === 'premium'
|
!useState('cardTitleTypeColor')
|
||||||
? 'amber'
|
? undefined
|
||||||
: cardTitleColor
|
: {
|
||||||
: cardTitleColor,
|
color:
|
||||||
|
tank.treeType === 'premium'
|
||||||
|
? amberDark.amber11
|
||||||
|
: blueDark.blue11,
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
{...restCardTitleProps}
|
|
||||||
>
|
>
|
||||||
<Flex align="center" gap="1">
|
<Flex align="center" gap="1">
|
||||||
{useState('cardTitleClassIcon') && tank !== null && (
|
{useState('cardTitleClassIcon') && tank !== null && (
|
||||||
|
|||||||
Reference in new issue
Block a user