ui-beyable 1.1.0-beta.4 → 1.1.0-beta.5
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.
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BtnSizeType, BtnHorizontalSizeType } from '../Btn/types';
|
|
3
3
|
type valueType = string | boolean | number;
|
|
4
|
+
type optionType = {
|
|
5
|
+
value: valueType;
|
|
6
|
+
label?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
customIcon?: React.ReactElement;
|
|
9
|
+
lucideIcon?: React.ReactElement;
|
|
10
|
+
};
|
|
4
11
|
interface BtnSwitchProps {
|
|
5
12
|
value: valueType;
|
|
6
|
-
optionsList: Array<
|
|
7
|
-
value: valueType;
|
|
8
|
-
label?: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
}>;
|
|
13
|
+
optionsList: Array<optionType>;
|
|
11
14
|
onChange: (value: valueType) => void;
|
|
12
15
|
appearance?: 'outline' | 'ghost';
|
|
13
16
|
className?: string;
|
package/lib/cjs/index.js
CHANGED
|
@@ -2111,7 +2111,7 @@ var BtnSwitch = function (_a) {
|
|
|
2111
2111
|
return (React.createElement(React.Fragment, { key: i + '_' + o.value },
|
|
2112
2112
|
hasSeparator && i > 0 &&
|
|
2113
2113
|
React.createElement("span", { className: (isActive || previousIsActive) ? styles$k.separatorHidden : styles$k.separatorVisible }),
|
|
2114
|
-
React.createElement(Btn, { message: o.label, icon: o.icon, style: style, isActive: isActive, color: "secondary", onClick: function () { return onChange(o.value); }, size: btnSize, fontSize: btnFontSize, horizontalSize: btnHorizontalSize, className: btnClass.join(' '), hasMinWith: false, light: isActive ? false : btnIsLight })));
|
|
2114
|
+
React.createElement(Btn, { message: o.label, icon: o.icon, customIcon: o.customIcon, lucideIcon: o.lucideIcon, style: style, isActive: isActive, color: "secondary", onClick: function () { return onChange(o.value); }, size: btnSize, fontSize: btnFontSize, horizontalSize: btnHorizontalSize, className: btnClass.join(' '), hasMinWith: false, light: isActive ? false : btnIsLight })));
|
|
2115
2115
|
})));
|
|
2116
2116
|
};
|
|
2117
2117
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BtnSizeType, BtnHorizontalSizeType } from '../Btn/types';
|
|
3
3
|
type valueType = string | boolean | number;
|
|
4
|
+
type optionType = {
|
|
5
|
+
value: valueType;
|
|
6
|
+
label?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
customIcon?: React.ReactElement;
|
|
9
|
+
lucideIcon?: React.ReactElement;
|
|
10
|
+
};
|
|
4
11
|
interface BtnSwitchProps {
|
|
5
12
|
value: valueType;
|
|
6
|
-
optionsList: Array<
|
|
7
|
-
value: valueType;
|
|
8
|
-
label?: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
}>;
|
|
13
|
+
optionsList: Array<optionType>;
|
|
11
14
|
onChange: (value: valueType) => void;
|
|
12
15
|
appearance?: 'outline' | 'ghost';
|
|
13
16
|
className?: string;
|
package/lib/esm/index.js
CHANGED
|
@@ -2109,7 +2109,7 @@ var BtnSwitch = function (_a) {
|
|
|
2109
2109
|
return (React.createElement(Fragment, { key: i + '_' + o.value },
|
|
2110
2110
|
hasSeparator && i > 0 &&
|
|
2111
2111
|
React.createElement("span", { className: (isActive || previousIsActive) ? styles$k.separatorHidden : styles$k.separatorVisible }),
|
|
2112
|
-
React.createElement(Btn, { message: o.label, icon: o.icon, style: style, isActive: isActive, color: "secondary", onClick: function () { return onChange(o.value); }, size: btnSize, fontSize: btnFontSize, horizontalSize: btnHorizontalSize, className: btnClass.join(' '), hasMinWith: false, light: isActive ? false : btnIsLight })));
|
|
2112
|
+
React.createElement(Btn, { message: o.label, icon: o.icon, customIcon: o.customIcon, lucideIcon: o.lucideIcon, style: style, isActive: isActive, color: "secondary", onClick: function () { return onChange(o.value); }, size: btnSize, fontSize: btnFontSize, horizontalSize: btnHorizontalSize, className: btnClass.join(' '), hasMinWith: false, light: isActive ? false : btnIsLight })));
|
|
2113
2113
|
})));
|
|
2114
2114
|
};
|
|
2115
2115
|
|