Update new functions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// components/Alert.js
|
||||
import { $html } from "../sigpro.js";
|
||||
import { Tag } from "../sigpro.js";
|
||||
import { ui, getIcon } from "../core/utils.js";
|
||||
|
||||
/**
|
||||
@@ -26,16 +26,16 @@ export const Alert = (props, children) => {
|
||||
|
||||
const content = children || props.message;
|
||||
|
||||
return $html("div", {
|
||||
return Tag("div", {
|
||||
...rest,
|
||||
role: "alert",
|
||||
class: ui('alert', allClasses),
|
||||
}, () => [
|
||||
getIcon(iconMap[type]),
|
||||
$html("div", { class: "flex-1" }, [
|
||||
$html("span", {}, [typeof content === "function" ? content() : content])
|
||||
Tag("div", { class: "flex-1" }, [
|
||||
Tag("span", {}, [typeof content === "function" ? content() : content])
|
||||
]),
|
||||
actions ? $html("div", { class: "flex-none" }, [
|
||||
actions ? Tag("div", { class: "flex-none" }, [
|
||||
typeof actions === "function" ? actions() : actions
|
||||
]) : null,
|
||||
].filter(Boolean));
|
||||
|
||||
Reference in New Issue
Block a user