-
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.
v3 - Show Benefits by location (#609)
* show Benefits by location * cleanup in benefit schema and moved filtering of benefits to compensatins * Update studio/schemas/objects/compensations/benefitsByLocation.ts Co-authored-by: Mathias Oterhals Myklebust <24361490+mathiazom@users.noreply.github.com> * created reference interface --------- Co-authored-by: Mathias Oterhals Myklebust <24361490+mathiazom@users.noreply.github.com>
- Loading branch information
Showing
8 changed files
with
105 additions
and
82 deletions.
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
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
23 changes: 23 additions & 0 deletions
23
src/compensations/components/benefitsByLocation/BenefitsByLocation.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,23 @@ | ||
import Text from "src/components/text/Text"; | ||
import { RichText } from "src/components/richText/RichText"; | ||
import styles from "./benefitsByLocation.module.css"; | ||
import { Benefit } from "studio/lib/payloads/compensations"; | ||
|
||
interface BenefitsByLocationProps { | ||
benefits: Benefit[]; | ||
} | ||
|
||
export default function BenefitsByLocation({ | ||
benefits, | ||
}: BenefitsByLocationProps) { | ||
return ( | ||
<div className={styles.benefits}> | ||
{benefits.map((benefit: Benefit) => ( | ||
<div key={benefit._key} className={styles.benefitWrapper}> | ||
<Text type="h2">{benefit.basicTitle}</Text> | ||
<RichText value={benefit.richText} /> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} |
12 changes: 12 additions & 0 deletions
12
src/compensations/components/benefitsByLocation/benefitsByLocation.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,12 @@ | ||
.benefits { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 5rem; | ||
max-width: var(--max-content-width-medium); | ||
} | ||
|
||
.benefitWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} |
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 was deleted.
Oops, something went wrong.
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