adwaita-web
Version:
A GTK inspired toolkit designed to build awesome web apps
44 lines (43 loc) • 847 B
JavaScript
import cx from "clsx";
import React from "react";
function Label({
children,
className,
size = "medium",
align,
fill,
ellipsis,
title,
disabled,
muted,
info,
success,
warning,
danger,
italic,
bold,
noSelect,
grow,
...rest
}) {
const as = rest.htmlFor ? "label" : "span";
return React.createElement(as, {
className: cx("Label", size, align ? `align-${align}` : void 0, typeof fill === "string" ? `fill-${fill}` : fill ? "fill" : void 0, typeof grow === "number" ? `grow-${grow}` : grow ? "grow" : void 0, {
ellipsis,
title,
disabled,
info,
success,
warning,
danger,
"text-muted": muted,
"text-italic": italic,
"text-bold": bold,
"user-select-none": noSelect
}) + " " + cx(className),
...rest
}, children);
}
export {
Label
};