From 69e788dbc7440ff73ef4a8e3b2764bb4f69fb752 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 13 Jun 2021 18:54:08 -0400 Subject: [PATCH] Fix style not applying to skip notice --- src/components/NoticeComponent.tsx | 6 ++++-- src/components/SkipNoticeComponent.tsx | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/NoticeComponent.tsx b/src/components/NoticeComponent.tsx index 3867fa0a..5317e7a3 100644 --- a/src/components/NoticeComponent.tsx +++ b/src/components/NoticeComponent.tsx @@ -15,7 +15,8 @@ export interface NoticeProps { // Callback for when this is closed closeListener: () => void, - zIndex?: number + zIndex?: number, + style?: React.CSSProperties } export interface NoticeState { @@ -70,7 +71,8 @@ class NoticeComponent extends React.Component { render(): React.ReactElement { const noticeStyle: React.CSSProperties = { - zIndex: this.props.zIndex || (50 + this.amountOfPreviousNotices) + zIndex: this.props.zIndex || (1000 + this.amountOfPreviousNotices), + ...(this.props.style ?? {}) } return ( diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 01b2a15e..c82249e0 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -126,9 +126,7 @@ class SkipNoticeComponent extends React.Component this.contentContainer().v?.playbackRate} + style={noticeStyle} ref={this.noticeRef} closeListener={() => this.closeListener()}>