property-practice-ui 0.0.13 → 0.1.1
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 +12 -0
- package/dist/index.cjs +3 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Tabs/Tabs.tsx +5 -11
package/dist/index.d.cts
CHANGED
|
@@ -98,10 +98,11 @@ declare const TableRow: ({ data, headers, paginationOptions, onDelete, variant,
|
|
|
98
98
|
|
|
99
99
|
interface TabsProps<T> {
|
|
100
100
|
defaultTab: T;
|
|
101
|
-
|
|
101
|
+
value: T;
|
|
102
|
+
onTabChange: (tab: T) => void;
|
|
102
103
|
options: Option<T>[];
|
|
103
104
|
}
|
|
104
|
-
declare const Tabs: <T extends string | number>({
|
|
105
|
+
declare const Tabs: <T extends string | number>({ value: tabValue, onTabChange, options }: TabsProps<T>) => react_jsx_runtime.JSX.Element;
|
|
105
106
|
|
|
106
107
|
interface Props$1 {
|
|
107
108
|
visible?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -98,10 +98,11 @@ declare const TableRow: ({ data, headers, paginationOptions, onDelete, variant,
|
|
|
98
98
|
|
|
99
99
|
interface TabsProps<T> {
|
|
100
100
|
defaultTab: T;
|
|
101
|
-
|
|
101
|
+
value: T;
|
|
102
|
+
onTabChange: (tab: T) => void;
|
|
102
103
|
options: Option<T>[];
|
|
103
104
|
}
|
|
104
|
-
declare const Tabs: <T extends string | number>({
|
|
105
|
+
declare const Tabs: <T extends string | number>({ value: tabValue, onTabChange, options }: TabsProps<T>) => react_jsx_runtime.JSX.Element;
|
|
105
106
|
|
|
106
107
|
interface Props$1 {
|
|
107
108
|
visible?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1801,21 +1801,19 @@ function TableHeader({
|
|
|
1801
1801
|
);
|
|
1802
1802
|
}
|
|
1803
1803
|
var Tabs = ({
|
|
1804
|
-
|
|
1804
|
+
value: tabValue,
|
|
1805
1805
|
onTabChange,
|
|
1806
1806
|
options
|
|
1807
1807
|
}) => {
|
|
1808
|
-
const [tab, setTab] = useState(defaultTab);
|
|
1809
1808
|
const handleTabChange = (newTab) => {
|
|
1810
|
-
|
|
1811
|
-
onTabChange?.(newTab);
|
|
1809
|
+
onTabChange(newTab);
|
|
1812
1810
|
};
|
|
1813
1811
|
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsx("div", { className: "px-4 border-b border-gray-300 bg-white", children: /* @__PURE__ */ jsx("div", { className: "flex gap-x-10 py-3", children: options.map(({ label, value }) => /* @__PURE__ */ jsx(
|
|
1814
1812
|
"button",
|
|
1815
1813
|
{
|
|
1816
1814
|
type: "button",
|
|
1817
1815
|
onClick: () => handleTabChange(value),
|
|
1818
|
-
className: `text-base font-semibold cursor-pointer px-6 py-2 rounded-t-lg border-b-4 transition-colors duration-200 ${
|
|
1816
|
+
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]"}`,
|
|
1819
1817
|
children: label.charAt(0).toUpperCase() + label.slice(1).toLowerCase()
|
|
1820
1818
|
},
|
|
1821
1819
|
value
|