Banner
A notice across the top of a page, with an action and a dismiss button.
Version 2 is out, with offline sync.
Read the notesforSlots(BannerSlots)(Recipes.Banner({}))
Usage
The function that drew the preview, over the theme module Create a theme writes. The preview passes it the style picked above instead of its default.
export const BannerStyle = forSlots(BannerSlots)(Recipes.Banner({}))
export const banner = <Message>(style: NamedStyle<typeof BannerSlots>, h: HtmlBuilder<Message>): Html =>
Banner.view(
{
label: 'Announcement',
message: 'Version 2 is out, with offline sync.',
action: { label: 'Read the notes', href: '#changelog' },
style,
},
h,
)