UNPKG

adwaita-web

Version:

A GTK inspired toolkit designed to build awesome web apps

29 lines (28 loc) 639 B
import cx from "clsx"; import React from "react"; function Frame({ children, className, inline, background, scrollable, border = true, label, padded, ...rest }) { const Component = label ? "fieldset" : "div"; return /* @__PURE__ */ React.createElement(Component, { className: cx("Frame", className, background ? `background-${background}` : void 0, { inline, padded, scrollable, "no-border": !border }), role: Component === "fieldset" ? "presentation" : void 0, ...rest }, label && /* @__PURE__ */ React.createElement("legend", null, label), children); } export { Frame };