@fewchurs/react 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@
4
4
  import { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
5
5
 
6
6
  // src/client/version.ts
7
- var SDK_VERSION = "1.2.1";
7
+ var SDK_VERSION = "1.3.0";
8
8
 
9
9
  // src/client/constants.ts
10
10
  var SDK_HEADER = `react/${SDK_VERSION}`;
@@ -1693,16 +1693,22 @@ function FewchursBoardDialog({
1693
1693
  import { useCallback as useCallback7, useState as useState11 } from "react";
1694
1694
  import { createPortal } from "react-dom";
1695
1695
  import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
1696
+ function launcherClasses(floating) {
1697
+ if (!floating) return "fw-launcher";
1698
+ const side = floating === "left" ? " fw-launcher--left" : "";
1699
+ return `fw-launcher fw-launcher--floating${side}`;
1700
+ }
1696
1701
  function FewchursButton({
1697
1702
  children = "Feedback",
1698
1703
  className,
1699
1704
  style,
1700
1705
  ariaLabel,
1706
+ floating = false,
1701
1707
  ...board
1702
1708
  }) {
1703
1709
  const [open, setOpen] = useState11(false);
1704
1710
  const close = useCallback7(() => setOpen(false), []);
1705
- const classes = [board.unstyled ? "" : "fw-launcher", className].filter(Boolean).join(" ");
1711
+ const classes = [board.unstyled ? "" : launcherClasses(floating), className].filter(Boolean).join(" ");
1706
1712
  return /* @__PURE__ */ jsxs10(Fragment3, { children: [
1707
1713
  /* @__PURE__ */ jsx13(
1708
1714
  "button",