Skip to content

Commit

Permalink
fix: employee card sizing for case page
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelbr committed Dec 12, 2024
1 parent 9847121 commit 4a43889
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export interface CustomerCaseEmployeeCardProps {
employeePageSlug?: string;
}

// TODO: Remove this component
// SHOULD USE SAME AS OTHER PLACES
export default function CustomerCaseEmployeeCard({
employee,
}: CustomerCaseEmployeeCardProps) {
Expand Down Expand Up @@ -48,13 +50,15 @@ export default function CustomerCaseEmployeeCard({
</div>
<div>
{employee.email && (
<Text type="bodyExtraSmall" className={styles.employeeEmail}>
{employee.email}
<Text type="bodyExtraSmall">
<a href={`mailto:${employee.email}`}>{employee.email}</a>
</Text>
)}
{employee.telephone && (
<Text type="bodyExtraSmall" className={styles.employeeTelephone}>
{formatPhoneNumber(employee.telephone)}
<Text type="bodyExtraSmall">
<a href={`tel:${employee.telephone}`}>
{formatPhoneNumber(employee.telephone)}
</a>
</Text>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
.employee {
display: flex;
display: grid;
grid-template-columns: 1fr 4fr;
gap: 1rem;
min-width: 375px;
flex: 1;
}

.employeeImage {
display: flex;
flex-direction: column;
align-items: center;
background-color: var(--background-bg-dark);
border-radius: 12px;
position: relative;
width: 112px;
height: 112px;
border-radius: var(--radius-medium);
overflow: hidden;
aspect-ratio: 1/1;
}

.employeeInfo {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}

Expand All @@ -30,20 +30,11 @@
}

.employeeRole {
display: flex;
width: fit-content;
flex-direction: row;
flex-wrap: wrap;
}

.employeeRoleDot::after {
.employeeRoleDot:not(:last-child)::after {
content: "·";
margin: 0 0.5rem;
}

.employeeRoleDot:last-child:after {
content: "";
margin: 0;
margin: 0 0.25rem;
}

.employeeRole {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
.wrapper {
display: flex;
flex-direction: column;
gap: 2rem;
gap: var(--padding-s);
margin: 4rem 0;

align-self: center;
width: 100%;
max-width: var(--max-content-width-medium);
}

.content {
width: 100%;
gap: 3rem;
display: flex;
flex-wrap: wrap;
flex-direction: row;
gap: 1.5em;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

0 comments on commit 4a43889

Please sign in to comment.