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

[style] Add economic benefits box #115 #124

Open
wants to merge 2 commits 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
13 changes: 12 additions & 1 deletion components/ProjectModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import {
DetailsContainer,
Developer,
DeveloperText,
EconomicBenefits,
EconomicBenefitsContainer,
LastUpdatedDiv,
modalContentStyles,
modalOverlayStyles,
Expand Down Expand Up @@ -113,6 +115,7 @@ export default function ProjectModal({
has_pumped_storage,
storage_size,
project_website_link,
economic_benefits,
} = project || {};

// Map KDMs
Expand Down Expand Up @@ -256,10 +259,18 @@ export default function ProjectModal({
isOpen={isKDMOpen}
setIsOpen={setIsKDMOpen}
/>
{economic_benefits ? (
<EconomicBenefits>
<EconomicBenefitsContainer>
<SubHeading2>ECONOMIC BENEFITS</SubHeading2>
<BodyText1>{economic_benefits}</BodyText1>
</EconomicBenefitsContainer>
</EconomicBenefits>
) : null}
{additional_information ? (
<AdditionalInfo>
<DetailsContainer>
<BodyText1>DETAILS</BodyText1>
<SubHeading2>DETAILS</SubHeading2>
<BodyText1>{additional_information}</BodyText1>
</DetailsContainer>
</AdditionalInfo>
Expand Down
26 changes: 23 additions & 3 deletions components/ProjectModal/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,34 @@ export const AdditionalInfo = styled.div`
box-shadow:
0px 2px 4px 0px rgba(77, 87, 114, 0.08),
0px -2px 5px 0px rgba(255, 255, 255, 0.1);
gap: 0.75rem;
`;

export const EconomicBenefits = styled.div`
display: flex;
flex-direction: column;
width: 16.95rem;
padding: 1.25rem 1.4rem;
border-radius: 8px 8px 12px 12px;
border: 1px solid rgba(46, 58, 89, 0.05);
box-shadow:
0px 2px 4px 0px rgba(77, 87, 114, 0.08),
0px -2px 5px 0px rgba(255, 255, 255, 0.1);
`;

export const DetailsContainer = styled.div`
display: flex;
align-items: center;
flex-direction: column;
align-items: flex-start;
width: 100%;
gap: 0.5rem;
gap: 0.75rem;
`;

export const EconomicBenefitsContainer = styled.div`
display: flex;
flex-direction: column;
align-items: flex-start;
width: 100%;
gap: 0.75rem;
`;

export const LastUpdatedDiv = styled.div`
Expand Down
6 changes: 3 additions & 3 deletions styles/texts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ export const SubHeading1 = styled.h2<TextProps>`
export const SubHeading2 = styled.h2<TextProps>`
${TextStylesCoinbaseMono}
font-size: 0.7rem;
color: ${COLORS.navy75};
color: ${COLORS.navy85};
font-style: normal;
font-weight: 400;
line-height: 120%;
`;

export const BodyText1 = styled.p<TextProps>`
${TextStylesCoinbaseMono}
color: ${COLORS.navy75};
color: ${COLORS.navy85};
font-size: 0.625rem;
font-style: normal;
font-weight: 400;
Expand Down Expand Up @@ -111,7 +111,7 @@ export const TagText1 = styled.p<TextProps>`
font-style: normal;
font-weight: 300;
line-height: normal;
color: ${({ $color }) => $color || COLORS.navy75};
color: ${({ $color }) => $color || COLORS.navy85};
`;

export const TagText2 = styled.p<TextProps>`
Expand Down
1 change: 1 addition & 0 deletions types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type Project = {
has_pumped_storage: boolean;
storage_size: number | null;
project_website_link: string | null;
economic_benefits: string | null;
};

export interface Option {
Expand Down
Loading