@particle-network/ui-native 0.4.2-beta.14 → 0.4.2-beta.15

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,17 +1,11 @@
1
1
  import React from 'react';
2
2
  import { type UXTabsProps } from '../UXTabs';
3
- interface UXTabSwitchProps {
4
- style?: UXTabsProps['style'];
5
- tabStyle?: UXTabsProps['tabStyle'];
6
- containerStyle?: UXTabsProps['containerStyle'];
7
- size?: UXTabsProps['size'];
8
- color?: UXTabsProps['color'];
3
+ interface UXTabSwitchProps extends Omit<UXTabsProps, 'variant' | 'selectedKey' | 'onSelectionChange'> {
9
4
  onTitle?: string;
10
5
  onIcon?: React.ReactNode;
11
6
  offTitle?: string;
12
7
  offIcon?: React.ReactNode;
13
8
  isSelected?: boolean;
14
- isDisabled?: boolean;
15
9
  onValueChange?: (isSelected: boolean) => void;
16
10
  }
17
11
  export declare const UXTabSwitch: React.FC<UXTabSwitchProps>;
@@ -3,20 +3,15 @@ import "react";
3
3
  import { useI18n } from "../../hooks/useI18n.js";
4
4
  import { UXTab, UXTabs } from "../UXTabs/index.js";
5
5
  const UXTabSwitch = (props)=>{
6
- const { style, tabStyle, containerStyle, size, color, onTitle, onIcon, offTitle, offIcon, isSelected = false, isDisabled = false, onValueChange } = props;
6
+ const { onTitle, onIcon, offTitle, offIcon, isSelected = false, onValueChange, ...restProps } = props;
7
7
  const i18n = useI18n();
8
8
  return /*#__PURE__*/ jsxs(UXTabs, {
9
- style: style,
10
- tabStyle: tabStyle,
11
- containerStyle: containerStyle,
12
- size: size,
13
9
  variant: "switch",
14
- color: color,
15
- isDisabled: isDisabled,
16
10
  selectedKey: isSelected.toString(),
17
11
  onSelectionChange: (key)=>{
18
12
  onValueChange?.('true' === key);
19
13
  },
14
+ ...restProps,
20
15
  children: [
21
16
  /*#__PURE__*/ jsx(UXTab, {
22
17
  title: offTitle || i18n.switch.off,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-native",
3
- "version": "0.4.2-beta.14",
3
+ "version": "0.4.2-beta.15",
4
4
  "main": "./entry.js",
5
5
  "react-native": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -45,8 +45,8 @@
45
45
  "react-native-size-matters": "^0.4.2",
46
46
  "react-native-toast-message": "^2.3.3",
47
47
  "react-native-worklets": "0.5.1",
48
- "@particle-network/icons": "0.4.2-beta.7",
49
- "@particle-network/ui-shared": "0.3.2-beta.3"
48
+ "@particle-network/ui-shared": "0.3.2-beta.3",
49
+ "@particle-network/icons": "0.4.2-beta.7"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@babel/core": "^7.24.0",