Update new functions
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import { $html } from "sigpro";
|
||||
import { Tag } from "sigpro";
|
||||
import { val } from "../core/utils.js";
|
||||
|
||||
/** FAB (Floating Action Button) */
|
||||
export const Fab = (props) => {
|
||||
const { icon, label, actions = [], position = "bottom-6 right-6", class: className = "", ...rest } = props;
|
||||
|
||||
return $html(
|
||||
return Tag(
|
||||
"div",
|
||||
{
|
||||
...rest,
|
||||
class: `fab absolute ${position} flex flex-col-reverse items-end gap-3 z-[100] ${className}`,
|
||||
},
|
||||
[
|
||||
$html(
|
||||
Tag(
|
||||
"div",
|
||||
{
|
||||
tabindex: 0,
|
||||
@@ -26,9 +26,9 @@ export const Fab = (props) => {
|
||||
),
|
||||
|
||||
...val(actions).map((act) =>
|
||||
$html("div", { class: "flex items-center gap-3 transition-all duration-300" }, [
|
||||
act.label ? $html("span", { class: "badge badge-ghost shadow-sm whitespace-nowrap" }, act.label) : null,
|
||||
$html(
|
||||
Tag("div", { class: "flex items-center gap-3 transition-all duration-300" }, [
|
||||
act.label ? Tag("span", { class: "badge badge-ghost shadow-sm whitespace-nowrap" }, act.label) : null,
|
||||
Tag(
|
||||
"button",
|
||||
{
|
||||
type: "button",
|
||||
|
||||
Reference in New Issue
Block a user