Skip to content

Commit fcb5d66

Browse files
purfectliteratureekowidianto
authored andcommitted
feat(timelinedesigner): remove space between items
1 parent f109a69 commit fcb5d66

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

client/app/bundles/course/reference-timelines/components/RowSpacer.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

client/app/bundles/course/reference-timelines/components/TimelinesStack/TimelinesStack.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import {
66

77
import { useAppSelector } from 'lib/hooks/store';
88

9-
import RowSpacer from '../RowSpacer';
10-
119
import AssignableTimeline from './AssignableTimeline';
1210
import AssignedTimeline from './AssignedTimeline';
1311

@@ -60,8 +58,6 @@ const TimelinesStack = (props: TimeBarsProps): JSX.Element => {
6058
/>
6159
);
6260
})}
63-
64-
<RowSpacer />
6561
</Fragment>
6662
);
6763
})}

client/app/bundles/course/reference-timelines/views/DayView/ItemsSidebar.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
TimelineData,
66
} from 'types/course/referenceTimelines';
77

8-
import RowSpacer from '../../components/RowSpacer';
98
import { getDaysFromSeconds } from '../../utils';
109

1110
import TimelineSidebarItem from './TimelineSidebarItem';
@@ -27,8 +26,17 @@ const ItemsSidebar = (props: ItemsSidebarProps): JSX.Element => {
2726
key={item.id}
2827
className="flex border-0 border-b border-solid border-neutral-200"
2928
>
30-
<div className="w-1/2 border-0 border-r border-solid border-neutral-200 py-2 pr-2">
31-
<Typography className="line-clamp-2" variant="body2">
29+
<div
30+
className={`w-1/2 border-0 border-r border-solid border-neutral-200 ${
31+
timelines.length <= 1 ? 'flex items-center' : 'py-2'
32+
} pr-2`}
33+
>
34+
<Typography
35+
className={
36+
timelines.length <= 1 ? 'line-clamp-1' : 'line-clamp-2'
37+
}
38+
variant="body2"
39+
>
3240
{item.title}
3341
</Typography>
3442
</div>
@@ -52,8 +60,6 @@ const ItemsSidebar = (props: ItemsSidebarProps): JSX.Element => {
5260
/>
5361
);
5462
})}
55-
56-
<RowSpacer />
5763
</div>
5864
</section>
5965
))}

client/app/bundles/course/reference-timelines/views/DayView/TimelineSidebarItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const TimelineSidebarItem = (props: TimelineSidebarItemProps): JSX.Element => {
1919

2020
return (
2121
<div
22-
className={`group box-content flex h-10 items-center justify-between border-0 border-b border-solid border-neutral-200 px-2 ${
22+
className={`group box-content flex h-10 items-center justify-between border-0 border-b border-solid border-neutral-200 px-2 last:border-b-0 ${
2323
!assigned
2424
? 'bg-neutral-100 text-neutral-400'
2525
: 'text-neutral-500 hover?:bg-neutral-50'

0 commit comments

Comments
 (0)