Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove text transformations when displaying character names #96

Merged
3 changes: 0 additions & 3 deletions frontend/src/components/asset-card/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ export const AssetTitleText = styled.h3`
font-weight: ${fontWeight.medium};
font-size: 16px;
line-height: 20px;
:first-letter {
text-transform: capitalize;
}
@media (max-width: ${breakpoints.mobile}) {
overflow: hidden;
white-space: nowrap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
CharacterCardsWrapper,
CharacterInfo,
CharacterInfoCharacter,
CharacterName,
} from "./styles";
import { useMyCharacters, useSelectedCharacter } from "../../../service";
import { useUserStateDispatch } from "../../../context/user";
Expand Down Expand Up @@ -81,7 +82,7 @@ const CharacterInformation: FC<CharacterInfo> = ({ character }) => {

return (
<CharacterInfo>
<ButtonText customColor={color.black}>{character.nft.name}</ButtonText>
<CharacterName customColor={color.black}>{character.nft.name}</CharacterName>
<CharacterInfoCharacter>Title: {character.nft.title}</CharacterInfoCharacter>
<CharacterInfoCharacter>Origin: {character.nft.origin}</CharacterInfoCharacter>
<AssetTag>
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/containers/canvas/character-cards/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,13 @@ export const CharacterCardContainer = styled.div<CharacterProps>`
border: 1px solid ${color.black};
}
`;

interface TextProps {
customColor?: string;
}
export const CharacterName = styled.h3<TextProps>`
font-weight: ${fontWeight.medium};
font-size: 14px;
line-height: 15px;
${({ customColor }): string => `color: ${customColor || color.black};`};
`;
5 changes: 3 additions & 2 deletions frontend/src/pages/landing/landing.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { FC, useState } from "react";
import { useLocation, useNavigate } from "react-router-dom";
import { text } from "../../assets";
import { CharacterTitle } from './styles'
import {
BaseRoute,
BoldLabel,
Expand Down Expand Up @@ -134,7 +135,7 @@ export const Landing: FC = () => {
{/* character info */}
{interactionMode === MAIN_MODE ? (
<DetailContainer>
<PageTitle>{selectedCharacter?.nft.name}</PageTitle>
<CharacterTitle>{selectedCharacter?.nft.name}</CharacterTitle>
<PageSubTitle>{selectedCharacter?.nft.title}</PageSubTitle>
<ButtonContainer>
<ButtonInfoWrap onClick={() => setShowDetails(true)}>
Expand All @@ -148,7 +149,7 @@ export const Landing: FC = () => {
</DetailContainer>
) : (
<DetailContainer>
<PageTitle>{selectedCharacter?.nft.name}</PageTitle>
<CharacterTitle>{selectedCharacter?.nft.name}</CharacterTitle>
<PageSubTitle>{selectedCharacter?.nft.title}</PageSubTitle>
<ButtonContainer>
<AssetTag>
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/pages/landing/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from "@emotion/styled";
import { CloseIcon, DownArrowIcon } from "../../assets";
import { disappear, fadeIn, SecondaryButton } from "../../components";
import { CharacterWrapper } from "../../components/base-character/styles";
import { color, margins } from "../../design";
import { color, fontWeight, margins } from "../../design";
import { DetailSectionWrap } from "../../containers/detail-section/styles";

interface ImageProps {
Expand Down Expand Up @@ -95,3 +95,10 @@ export const Tag = styled.div`
border-radius: ${margins.medium};
z-index: 1000;
`;

export const CharacterTitle = styled.h1`
color: ${color.black};
font-weight: ${fontWeight.medium};
font-size: 32px;
line-height: 52px;
`;
Loading