1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20[<AutoOpen>]
module Duets.Cli.Components.Notification
open Duets.Cli.Text
open Spectre.Console
/// Shows a notification inside of a panel with a bell with the given title
/// and the given body text.
let showNotification (title: string) (text: string) =
let header = PanelHeader(Styles.header $"{Emoji.notification} {title}")
Panel(
Markup(text),
Header = header,
Border = BoxBorder.Double,
Expand = true,
Padding = Padding(2, 4)
)
|> AnsiConsole.Write