-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(customerCase): featured customer cases
- Loading branch information
Showing
6 changed files
with
118 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/components/customerCases/customerCase/featuredCases/FeaturedCases.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { SanitySharedImage } from "src/components/image/SanityImage"; | ||
import Text from "src/components/text/Text"; | ||
import { CustomerCaseBase } from "studioShared/lib/interfaces/customerCases"; | ||
|
||
import styles from "./featuredCases.module.css"; | ||
|
||
export interface FeaturedCasesProps { | ||
featuredCases: CustomerCaseBase[]; | ||
} | ||
|
||
export default function FeaturedCases({ featuredCases }: FeaturedCasesProps) { | ||
return ( | ||
<div className={styles.wrapper}> | ||
<Text type={"h3"}>Lignende prosjekter</Text> | ||
<div className={styles.content}> | ||
{featuredCases.map((featuredCase) => ( | ||
<div key={featuredCase._id} className={styles.caseWrapper}> | ||
<div className={styles.caseImageWrapper}> | ||
<SanitySharedImage image={featuredCase.image} /> | ||
</div> | ||
<div> | ||
<Text type={"bodyBig"}>{featuredCase.basicTitle}</Text> | ||
<Text type={"bodySmall"}>{featuredCase.description}</Text> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
} |
34 changes: 34 additions & 0 deletions
34
src/components/customerCases/customerCase/featuredCases/featuredCases.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
margin: 4rem 0; | ||
} | ||
|
||
.content { | ||
display: flex; | ||
gap: 5rem; | ||
|
||
@media (max-width: 1024px) { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
.caseWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
max-width: 500px; | ||
flex-grow: 1; | ||
flex-basis: 0; | ||
} | ||
|
||
.caseImageWrapper { | ||
width: 100%; | ||
height: 200px; | ||
} | ||
|
||
.caseImageWrapper img { | ||
border-radius: 0.75rem; | ||
width: 100% !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters