Skip to content

Commit

Permalink
Changed the tags layout in calendar cells
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaVR committed Feb 8, 2019
1 parent f3c045f commit 11b4aab
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ node_modules/
/coverage

# production
/build
build

# misc
.DS_Store
Expand Down
15 changes: 10 additions & 5 deletions src/components/planning/PlanningsPage.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@
}

.calendarTag {
display: block !important;
font-size: 0.7rem !important;
height: 15px !important;
margin: 1px 0 !important;
line-height: 10px !important;
vertical-align: middle;

&Container {
height: 15px;
margin: 1px 0;
}

&Text {
vertical-align: middle;
}

&Outline {
background-color: transparent !important;
color: black !important;
}
}

Expand Down
16 changes: 8 additions & 8 deletions src/components/planning/PlanningsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ class PlanningsPage extends React.Component<PlanningsPageProps, IPlanningsPageSt
const usedCapacity = internshipsToday.filter((internship) => internship.departmentId === department.id).length;
const totalCapacity = department.totalCapacity;
return (
<Tag
key={department.id}
color={department.color}
style={{ border: `2px solid ${department.color}` }}
className={classNames(styles.notClickableTag, styles.calendarTag, { [styles.calendarTagOutline]: usedCapacity < totalCapacity })}
>
{usedCapacity} / {totalCapacity}
</Tag>
<div key={department.id} className={styles.calendarTagContainer}>
<Tag
color={department.color}
style={{ border: `2px solid ${department.color}` }}
className={classNames(styles.notClickableTag, styles.calendarTag, { [styles.calendarTagOutline]: usedCapacity < totalCapacity })}
/>
<span className={styles.calendarTagText}>{usedCapacity} / {totalCapacity}</span>
</div>
);
});
return (
Expand Down

1 comment on commit 11b4aab

@BenjaVR
Copy link
Owner

@BenjaVR BenjaVR commented on 11b4aab Feb 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#46

Please sign in to comment.