adwaita-web
Version:
A GTK inspired toolkit designed to build awesome web apps
41 lines (40 loc) • 789 B
JavaScript
import cx from "clsx";
import React from "react";
function Text({
children,
className,
size,
align,
weight,
fill,
hero,
muted,
info,
success,
warning,
danger,
italic,
bold,
noSelect,
grow,
as = "p",
...rest
}) {
return React.createElement(as, {
className: cx("Text", size, align ? `align-${align}` : void 0, typeof fill === "string" ? `fill-${fill}` : fill ? "fill" : void 0, typeof grow === "number" ? `grow-${grow}` : grow ? "grow" : void 0, weight ? `weight-${weight}` : void 0, {
hero,
info,
success,
warning,
danger,
"text-muted": muted,
"text-italic": italic,
"text-bold": bold,
"user-select-none": noSelect
}) + " " + cx(className),
...rest
}, children);
}
export {
Text
};