Skip to content

Commit

Permalink
remove odd day logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kiley-mitti committed May 7, 2024
1 parent ebc2f01 commit 748144e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
background-color: var(--color-background-base-default);
}

.odd-day:not(.ruler-new-day-cell) {
background: var(--odd-day-color);
}

.ruler-new-day-display {
display: flex;
align-items: flex-end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,12 @@ export class RuxRuler {
: ''
if (newDay !== '' && !this.firstNewDay)
this.firstNewDay = index

const isOddDay = (index: number) => {
if (this.firstNewDay) {
return (index - this.firstNewDay) % 48 <= 23
}
return false
}
return (
<Fragment>
<span
key={index}
class={{
'ruler-time': true,
'odd-day': isOddDay(index),
'ruler-new-day-cell': this.shouldShowDate(
time
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
}

--grid-line-color: transparent;
--odd-day-color: transparent;
}

:host([show-grid]) {
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
start="2021-02-01T00:00:00.000Z"
end="2021-03-03T01:00:00.000Z"
playhead="2021-02-02T00:00:00.000Z"
interval="hour"
interval="week"
zoom="4"
show-grid
>
Expand Down

0 comments on commit 748144e

Please sign in to comment.