Alert
Callout для важных сообщений.
github.com/fastygo/templ/ui
Callout для важных сообщений.
По умолчанию
Обратите внимание
Компоненты можно добавлять из галереи.
import cmp "github.com/fastygo/templ/components"
import "github.com/fastygo/templ/ui"
templ Example() {
@cmp.Alert(cmp.AlertProps{}) {
@ui.Title(ui.TitleProps{Order: 4, Class: "text-sm font-semibold"}, "Обратите внимание")
@ui.Text(ui.TextProps{Class: "text-sm"}, "Компоненты можно добавлять из галереи.")
}
}
import cmp "github.com/fastygo/templ/components"
import "github.com/fastygo/templ/ui"
templ Example() {
@cmp.Alert(cmp.AlertProps{}) {
@ui.Title(ui.TitleProps{Order: 4, Class: "text-sm font-semibold"}, "Обратите внимание")
@ui.Text(ui.TextProps{Class: "text-sm"}, "Компоненты можно добавлять из галереи.")
}
}
Деструктивный
Ошибка
Что-то пошло не так.
import cmp "github.com/fastygo/templ/components"
import "github.com/fastygo/templ/ui"
templ Example() {
@cmp.Alert(cmp.AlertProps{Variant: "destructive"}) {
@ui.Title(ui.TitleProps{Order: 4, Class: "text-sm font-semibold"}, "Ошибка")
@ui.Text(ui.TextProps{Class: "text-sm"}, "Что-то пошло не так.")
}
}
import cmp "github.com/fastygo/templ/components"
import "github.com/fastygo/templ/ui"
templ Example() {
@cmp.Alert(cmp.AlertProps{Variant: "destructive"}) {
@ui.Title(ui.TitleProps{Order: 4, Class: "text-sm font-semibold"}, "Ошибка")
@ui.Text(ui.TextProps{Class: "text-sm"}, "Что-то пошло не так.")
}
}
API
Variant · string — default | destructive
Class · string — Дополнительные утилиты