property-practice-ui 0.0.13 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # property-practice-ui
2
2
 
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b62ae44: manage tab change behaviour on client side
8
+
3
9
  ## 0.0.13
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1808,21 +1808,19 @@ function TableHeader({
1808
1808
  );
1809
1809
  }
1810
1810
  var Tabs = ({
1811
- defaultTab,
1811
+ value: tabValue,
1812
1812
  onTabChange,
1813
1813
  options
1814
1814
  }) => {
1815
- const [tab, setTab] = react.useState(defaultTab);
1816
1815
  const handleTabChange = (newTab) => {
1817
- setTab(newTab);
1818
- onTabChange?.(newTab);
1816
+ onTabChange(newTab);
1819
1817
  };
1820
1818
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 border-b border-gray-300 bg-white", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-x-10 py-3", children: options.map(({ label, value }) => /* @__PURE__ */ jsxRuntime.jsx(
1821
1819
  "button",
1822
1820
  {
1823
1821
  type: "button",
1824
1822
  onClick: () => handleTabChange(value),
1825
- className: `text-base font-semibold cursor-pointer px-6 py-2 rounded-t-lg border-b-4 transition-colors duration-200 ${tab === value ? "border-blue-600 text-[#033c89]" : "border-transparent text-gray-400 dark:text-[#033c89]"}`,
1823
+ className: `text-base font-semibold cursor-pointer px-6 py-2 rounded-t-lg border-b-4 transition-colors duration-200 ${tabValue === value ? "border-blue-600 text-[#033c89]" : "border-transparent text-gray-400 dark:text-[#033c89]"}`,
1826
1824
  children: label.charAt(0).toUpperCase() + label.slice(1).toLowerCase()
1827
1825
  },
1828
1826
  value