From 882d462849286a83ea6e6a204efd48610bdaaeca Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 28 Jul 2023 18:42:27 -0400 Subject: Add category color to skip notice --- src/components/NoticeComponent.tsx | 10 ++++--- src/components/SkipNoticeComponent.tsx | 4 ++- src/svg-icons/sb_svg.tsx | 55 ++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 src/svg-icons/sb_svg.tsx diff --git a/src/components/NoticeComponent.tsx b/src/components/NoticeComponent.tsx index b710480e..2f404ba1 100644 --- a/src/components/NoticeComponent.tsx +++ b/src/components/NoticeComponent.tsx @@ -1,5 +1,6 @@ import * as React from "react"; import Config from "../config"; +import SbSvg from "../svg-icons/sb_svg"; enum CountdownMode { Timer, @@ -28,6 +29,7 @@ export interface NoticeProps { extraClass?: string; hideLogo?: boolean; hideRightInfo?: boolean; + logoFill?: string; // Callback for when this is closed closeListener: () => void; @@ -122,10 +124,10 @@ class NoticeComponent extends React.Component { {/* Logo */} {!this.props.hideLogo && - - + } this.closeListener()} smaller={this.state.smaller} + logoFill={Config.config.barTypes[this.segments[0].category].color} limitWidth={true} firstColumn={firstColumn} bottomRow={[...this.getMessageBoxes(), ...this.getBottomRow() ]} diff --git a/src/svg-icons/sb_svg.tsx b/src/svg-icons/sb_svg.tsx new file mode 100644 index 00000000..bb4a2472 --- /dev/null +++ b/src/svg-icons/sb_svg.tsx @@ -0,0 +1,55 @@ +import * as React from "react"; + +export interface SbIconProps { + id?: string; + fill?: string; + className?: string; + width?: string; + height?: string; + onClick?: () => void; +} + +export default function SbSvg({ + id = "", + fill = "#ff0000", + className = "", + onClick +}: SbIconProps): JSX.Element { + return ( + onClick?.() } > + + + + + + + + + ); +} \ No newline at end of file -- cgit v1.2.3