Skip to content

Commit c160ade

Browse files
authored
Feat: [Timeline] option to specify secondary label opacity (#3392)
1 parent 7c1a554 commit c160ade

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
@@ -27,6 +27,8 @@ export type TimelinePluginOptions = {
2727
style?: Partial<CSSStyleDeclaration> | string
2828
/** Turn the time into a suitable label for the time. */
2929
formatTimeCallback?: (seconds: number) => string
30+
/** Opacity of the secondary labels, defaults to 0.25 */
31+
secondaryLabelOpacity?: number
3032
}
3133

3234
const defaultOptions = {
@@ -195,7 +197,7 @@ class TimelinePlugin extends BasePlugin<TimelinePluginEvents, TimelinePluginOpti
195197
${isTop ? 'top: 0;' : 'bottom: 0;'}
196198
overflow: visible;
197199
border-left: 1px solid currentColor;
198-
opacity: 0.25;
200+
opacity: ${this.options.secondaryLabelOpacity ?? 0.25};
199201
position: absolute;
200202
z-index: 1;
201203
`,

0 commit comments

Comments
 (0)