From 21880ecf08f6509e0abbd7e9cc59b7a779441948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B0=D1=81=D1=83=D0=BB?= Date: Fri, 1 Nov 2024 10:50:26 +0300 Subject: [PATCH] feat: updated icon and color for label --- src/components/Universe/Graph/index.tsx | 2 +- src/components/common/TypeBadge/index.tsx | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/components/Universe/Graph/index.tsx b/src/components/Universe/Graph/index.tsx index a9ca224d6..8f1025002 100644 --- a/src/components/Universe/Graph/index.tsx +++ b/src/components/Universe/Graph/index.tsx @@ -139,7 +139,7 @@ export const Graph = () => { material.color = new Color(lineColor) material.transparent = true - material.opacity = 1 + material.opacity = 0.5 } }) } diff --git a/src/components/common/TypeBadge/index.tsx b/src/components/common/TypeBadge/index.tsx index 510c57397..7e2a96587 100644 --- a/src/components/common/TypeBadge/index.tsx +++ b/src/components/common/TypeBadge/index.tsx @@ -16,7 +16,7 @@ type BadgeProps = { export const TypeBadge = ({ type }: Props) => { let badgeProps: Omit const [normalizedSchemasByType] = useSchemaStore((s) => [s.normalizedSchemasByType]) - const nodeType = type.toLowerCase() + const nodeType = type const primaryColor = normalizedSchemasByType[type]?.primary_color const primaryIcon = normalizedSchemasByType[type]?.icon @@ -93,14 +93,6 @@ export const TypeBadge = ({ type }: Props) => { break - case 'topic': - badgeProps = { - iconStart: icon ?? 'topic_badge.svg', - color: primaryColor ?? colors.TOPIC, - } - - break - default: badgeProps = { iconStart: icon ?? 'thing_badge.svg', @@ -114,7 +106,7 @@ export const TypeBadge = ({ type }: Props) => { } const Badge = ({ iconStart, color, label }: BadgeProps) => ( - + {label}
{label}
@@ -122,7 +114,7 @@ const Badge = ({ iconStart, color, label }: BadgeProps) => ( const EpisodeWrapper = styled(Flex).attrs({ direction: 'row', -})<{ color: string; label: string }>` +})<{ color: string }>` cursor: pointer; background: ${({ color }) => color}; border-radius: 3px; @@ -139,7 +131,7 @@ const EpisodeWrapper = styled(Flex).attrs({ } .badge__label { - color: ${({ label }) => (label.toLowerCase() === 'topic' ? colors.black : colors.white)}; + color: ${colors.white}; font-family: Barlow; font-size: 8px; font-style: normal;