2025-11-07 23:45:48 +02:00
|
|
|
import "./InfoBar.css";
|
2025-11-09 02:14:43 +02:00
|
|
|
import { ComponentChildren, CSSProperties } from "preact";
|
2025-11-07 23:45:48 +02:00
|
|
|
|
|
|
|
|
export type InfoBarParams = {
|
2025-11-09 01:56:52 +02:00
|
|
|
type: "prominent" | "subtle",
|
|
|
|
|
className: string;
|
2025-11-09 02:14:43 +02:00
|
|
|
style: CSSProperties
|
2025-11-07 23:45:48 +02:00
|
|
|
children: ComponentChildren;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default function InfoBar(props: InfoBarParams) {
|
2025-11-09 02:14:43 +02:00
|
|
|
return <div className={`info-bar ${props.className} info-bar-${props.type}`} style={props.style}>
|
2025-11-07 23:45:48 +02:00
|
|
|
{props?.children}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InfoBar.defaultProps = {
|
|
|
|
|
type: "prominent"
|
|
|
|
|
} as InfoBarParams
|