mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
client/read only note info bar: refactor
This commit is contained in:
18
apps/client/src/widgets/react/InfoBar.tsx
Normal file
18
apps/client/src/widgets/react/InfoBar.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ComponentChildren } from "preact";
|
||||
|
||||
import "./InfoBar.css";
|
||||
|
||||
export type InfoBarParams = {
|
||||
type: "prominent" | "subtle"
|
||||
children: ComponentChildren;
|
||||
};
|
||||
|
||||
export default function InfoBar(props: InfoBarParams) {
|
||||
return <div className={`info-bar info-bar-${props.type}`}>
|
||||
{props?.children}
|
||||
</div>
|
||||
}
|
||||
|
||||
InfoBar.defaultProps = {
|
||||
type: "prominent"
|
||||
} as InfoBarParams
|
||||
Reference in New Issue
Block a user