@sheinx/base 3.6.5 → 3.6.6-beta.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.
@@ -36,7 +36,8 @@ var TabsPanel = function TabsPanel(props) {
36
36
  active = _useTabsContext.active,
37
37
  lazy = _useTabsContext.lazy,
38
38
  setTabs = _useTabsContext.setTabs,
39
- color = _useTabsContext.color;
39
+ color = _useTabsContext.color,
40
+ shape = _useTabsContext.shape;
40
41
  var isActive = active === id;
41
42
  var keekAlive = (0, _react.useRef)(false);
42
43
  (0, _react.useLayoutEffect)(function () {
@@ -45,7 +46,7 @@ var TabsPanel = function TabsPanel(props) {
45
46
  tab: tab,
46
47
  disabled: props.disabled,
47
48
  jssStyle: jssStyle,
48
- background: background,
49
+ background: shape !== 'button' && shape !== 'fill' ? background : undefined,
49
50
  color: props.color || (active === id ? color : undefined)
50
51
  };
51
52
  setTabs(function (prev) {
@@ -74,7 +75,7 @@ var TabsPanel = function TabsPanel(props) {
74
75
  });
75
76
  });
76
77
  };
77
- }, [id, tab, color, active, props.disabled, props.jssStyle]);
78
+ }, [id, tab, color, active, shape, props.disabled, props.jssStyle]);
78
79
  if (!isActive && lazy && !keekAlive.current) {
79
80
  return null;
80
81
  }
@@ -29,7 +29,8 @@ var TabsPanel = function TabsPanel(props) {
29
29
  active = _useTabsContext.active,
30
30
  lazy = _useTabsContext.lazy,
31
31
  setTabs = _useTabsContext.setTabs,
32
- color = _useTabsContext.color;
32
+ color = _useTabsContext.color,
33
+ shape = _useTabsContext.shape;
33
34
  var isActive = active === id;
34
35
  var keekAlive = useRef(false);
35
36
  useLayoutEffect(function () {
@@ -38,7 +39,7 @@ var TabsPanel = function TabsPanel(props) {
38
39
  tab: tab,
39
40
  disabled: props.disabled,
40
41
  jssStyle: jssStyle,
41
- background: background,
42
+ background: shape !== 'button' && shape !== 'fill' ? background : undefined,
42
43
  color: props.color || (active === id ? color : undefined)
43
44
  };
44
45
  setTabs(function (prev) {
@@ -67,7 +68,7 @@ var TabsPanel = function TabsPanel(props) {
67
68
  });
68
69
  });
69
70
  };
70
- }, [id, tab, color, active, props.disabled, props.jssStyle]);
71
+ }, [id, tab, color, active, shape, props.disabled, props.jssStyle]);
71
72
  if (!isActive && lazy && !keekAlive.current) {
72
73
  return null;
73
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.6.5",
3
+ "version": "3.6.6-beta.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.6.5",
13
+ "@sheinx/hooks": "3.6.6-beta.1",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"