UNPKG

@veracity/vui

Version:

Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.

70 lines (68 loc) 2.01 kB
import vui from "../core/vui.js"; import { DismissButton } from "../dismissButton/DismissButton.js"; import { Button } from "./button.js"; import { useEffect } from "react"; import { jsx } from "react/jsx-runtime"; //#region src/button/buttons.tsx const AppButton = vui((props, ref) => /* @__PURE__ */ jsx(Button, { ref, variant: "primary", ...props })); AppButton.displayName = "AppButton"; const IconButton = vui((props, ref) => /* @__PURE__ */ jsx(Button, { ref, variant: "secondary", ...props })); IconButton.displayName = "IconButton"; const BackButton = vui((props, ref) => /* @__PURE__ */ jsx(IconButton, { startIcon: "uiArrowLeft", ref, variant: "tertiary", ...props })); BackButton.displayName = "BackButton"; /** @deprecated Renamed to `DismissButton`. Will be removed in VUI 6. */ const CloseButton = vui((props, ref) => { useEffect(() => { console.warn("[VUI] `CloseButton` is deprecated. Use `DismissButton` instead. Will be removed in VUI 6."); }, []); const { size, ...restProps } = props; return /* @__PURE__ */ jsx(DismissButton, { ref, size: size === "xl" ? "lg" : size, ...restProps }); }); CloseButton.displayName = "CloseButton"; const CTAButton = vui((props, ref) => /* @__PURE__ */ jsx(Button, { ref, variant: "primary", intent: "success", ...props })); CTAButton.displayName = "CTAButton"; const DangerButton = vui((props, ref) => /* @__PURE__ */ jsx(Button, { ref, variant: "primary", intent: "danger", ...props })); DangerButton.displayName = "DangerButton"; const LineButton = vui((props, ref) => /* @__PURE__ */ jsx(Button, { ref, variant: "secondary", ...props })); LineButton.displayName = "LineButton"; const TextButton = vui((props, ref) => /* @__PURE__ */ jsx(Button, { ref, variant: "tertiary", ...props })); TextButton.displayName = "TextButton"; //#endregion export { AppButton, BackButton, CTAButton, CloseButton, DangerButton, IconButton, LineButton, TextButton }; globalThis.__vuiVersion__ = "5.3.1" //# sourceMappingURL=buttons.js.map