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

feat: exchange card visual changes #867

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styled, { css } from "styled-components";
import { theme } from "../../theme";
import { ExchangeCardStatus } from "./types";
import { ProductCardLabelWrapper } from "../productCard/ProductCard.styles";
import { Grid } from "../ui/Grid";

const topSpace = "1rem";
const sideSpace = "1rem";
Expand Down Expand Up @@ -32,7 +33,7 @@ export const ExchangeCreatorName = styled.div`
font-weight: 600;
font-size: 0.75rem;
line-height: 150%;
color: ${({ theme }) => theme?.colors?.light.accent};
color: ${({ theme }) => theme?.colors?.light.darkGrey};
flex: none;
order: 1;
flex-grow: 0;
Expand All @@ -48,12 +49,7 @@ export const ExchangeTitle = styled.div`
word-break: break-word;
`;

export const ExchangeCardPriceWrapper = styled.div`
display: flex;
flex-direction: column;
align-self: stretch;
max-width: 50%;
min-width: 44%;
export const ExchangeCardPriceWrapper = styled(Grid)`
span {
padding-left: 0.5rem;
}
Expand Down Expand Up @@ -89,6 +85,7 @@ export const ExchangeCardBottomContent = styled.div`
box-sizing: border-box;
align-items: flex-start;
border-top: 2px solid ${theme.colors.light.border};
flex-direction: column;
`;

export const ExchangeCardWrapper = styled.div<{
Expand Down
22 changes: 15 additions & 7 deletions packages/react-kit/src/components/exchangeCard/ExchangeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ import {
RedeemButtonWrapper
} from "./ExchangeCard.styles";
import { ExchangeCardStatus } from "./types";
import {
ProductCardTitle,
ProductCardTitleWrapper
} from "../productCard/ProductCard.styles";
export type { ExchangeCardStatus } from "./types";
interface Base {
id: string;
Expand Down Expand Up @@ -187,24 +191,28 @@ export const ExchangeCard = (props: ExchangeCardProps) => {
onAvatarNameClick?.();
}}
>
<ExchangeCreatorAvatar>
<img src={avatar} alt="avatar" />
</ExchangeCreatorAvatar>
<ProductCardTitleWrapper>
<ProductCardTitle fontSize={"0.75rem"} fontWeight={"600"}>
{title}
</ProductCardTitle>
</ProductCardTitleWrapper>
<ExchangeCreatorName data-avatarname="exchange-card">
{avatarName}
</ExchangeCreatorName>
</ExchangeCreator>
<ExchangeTitle>{title}</ExchangeTitle>
</ExchangeCarData>
<ExchangeCardPriceWrapper>
<ExchangeCardPrice>Price</ExchangeCardPrice>
<CurrencyDisplay
value={price}
currency={currency}
fontSize={"0.875rem"}
iconSize={16}
gap={"0.3125rem"}
style={{
wordBreak: "break-all",
alignItems: "flex-start",
justifyContent: "flex-end"
alignItems: "center",
justifyContent: "center",
paddingTop: "0.25rem"
}}
/>
</ExchangeCardPriceWrapper>
Expand Down
Loading