Banner and callout
Banner, Callout. They are copied into your app’s ui/ by qatjs add banner: the code is yours to edit.
Example
import { Banner, Callout } from './ui/banner/banner.qx'
import Button from './ui/button/button.qx'
export default function Example() {
return (
<Banner
tone="warning"
dismissible
action={
<Button size="sm" variant="tertiary">
Change courier
</Button>
}
>
Azərpoçt is not collecting today. Orders placed now ship tomorrow.
</Banner>
<Banner tone="danger">
Payments are down since 09:12. Orders are saved and will charge when the provider recovers.
</Banner>
<Callout>Derived values are lazy. Nothing is computed until something reads it.</Callout>
)
}Add it
npx qatjs add bannerBanner
As a custom element: <ui-banner>.
| Prop | Type | Attribute |
|---|---|---|
tone | 'info' | 'success' | 'warning' | 'danger' | yes |
action | QatNode | property only |
dismissible | boolean | yes |
dismissLabel | string | yes |
| Event | Detail |
|---|---|
on:dismiss | CustomEvent<undefined> |
Callout
As a custom element: <ui-callout>.
| Prop | Type | Attribute |
|---|---|---|
tone | 'info' | 'success' | 'warning' | 'danger' | yes |