Skip to content

Commit 83a0909

Browse files
Feat: [Timeline] Add timeline-notch-{mode} to part (#3401)
1 parent c160ade commit 83a0909

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plugins/timeline.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ class TimelinePlugin extends BasePlugin<TimelinePluginEvents, TimelinePluginOpti
185185
}
186186

187187
const notchEl = document.createElement('div')
188-
notchEl.setAttribute('part', 'timeline-notch')
189188
notchEl.setAttribute(
190189
'style',
191190
`
@@ -219,6 +218,9 @@ class TimelinePlugin extends BasePlugin<TimelinePluginEvents, TimelinePluginOpti
219218
if (isPrimary) notch.style.opacity = '1'
220219
}
221220

221+
const mode = isPrimary ? 'primary' : isSecondary ? 'secondary' : 'tick'
222+
notch.setAttribute('part', `timeline-notch timeline-notch-${mode}`)
223+
222224
notch.style.left = `${i * pxPerSec}px`
223225
timeline.appendChild(notch)
224226
}

0 commit comments

Comments
 (0)