@trionesdev/antd-taro-react 0.0.1-beta.3 → 0.0.1-beta.4

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,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const useResultIcon: (status?: 'success' | 'error' | 'info' | 'waiting' | 'warning') => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null;
2
+ export declare const useResultIcon: (status?: 'success' | 'error' | 'info' | 'waiting' | 'warning') => string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null;
@@ -3,15 +3,15 @@
3
3
  $class-prefix-safe-area: 'triones-antm-safe-area';
4
4
 
5
5
  .#{$class-prefix-safe-area} {
6
- --multiple: var($trionesSafeAreaMultiple, 1);
6
+
7
7
  display: block;
8
8
  width: 100%;
9
9
 
10
10
  &-position-top {
11
- padding-top: calc(env(safe-area-inset-top) * var(--multiple));
11
+ padding-top: calc(env(safe-area-inset-top) * $trionesSafeAreaMultiple);
12
12
  }
13
13
 
14
14
  &-position-bottom {
15
- padding-bottom: calc(env(safe-area-inset-bottom) * var(--multiple));
15
+ padding-bottom: calc(env(safe-area-inset-bottom) * $trionesSafeAreaMultiple);
16
16
  }
17
17
  }
@@ -1,6 +1,8 @@
1
1
  import React, { FC } from 'react';
2
2
  import './style.scss';
3
3
  export type ScaffoldProps = {
4
+ className?: string;
5
+ style?: React.CSSProperties;
4
6
  appBar?: React.ReactNode;
5
7
  children?: React.ReactNode;
6
8
  bottomNavigationBar?: React.ReactNode;
@@ -3,12 +3,15 @@ import React from 'react';
3
3
  import SafeArea from "../SafeArea";
4
4
  import "./style.scss";
5
5
  export var Scaffold = function Scaffold(_ref) {
6
- var appBar = _ref.appBar,
6
+ var className = _ref.className,
7
+ style = _ref.style,
8
+ appBar = _ref.appBar,
7
9
  children = _ref.children,
8
10
  bottomNavigationBar = _ref.bottomNavigationBar;
9
11
  var scaffoldCls = 'triones-antm-scaffold';
10
12
  return /*#__PURE__*/React.createElement("div", {
11
- className: classNames(scaffoldCls)
13
+ className: classNames(scaffoldCls, className),
14
+ style: style
12
15
  }, appBar && /*#__PURE__*/React.createElement(SafeArea, {
13
16
  position: 'top'
14
17
  }, appBar), /*#__PURE__*/React.createElement("div", {
@@ -1,7 +1,10 @@
1
+ import React from 'react';
1
2
  import type { FC, ReactNode } from 'react';
2
3
  import { NativeProps } from '../utils/native-props';
3
4
  import './style.scss';
4
5
  export type SwitchProps = {
6
+ className?: string;
7
+ style?: React.CSSProperties;
5
8
  loading?: boolean;
6
9
  disabled?: boolean;
7
10
  checked?: boolean;
@@ -103,7 +103,8 @@ export var Switch = function Switch(p) {
103
103
  }
104
104
  return withNativeProps(props, /*#__PURE__*/React.createElement("div", {
105
105
  onClick: onClick,
106
- className: classNames(classPrefix, _defineProperty(_defineProperty({}, "".concat(classPrefix, "-checked"), checked), "".concat(classPrefix, "-disabled"), disabled || changing)),
106
+ className: classNames(classPrefix, p.className, _defineProperty(_defineProperty({}, "".concat(classPrefix, "-checked"), checked), "".concat(classPrefix, "-disabled"), disabled || changing)),
107
+ style: p.style,
107
108
  role: "switch",
108
109
  "aria-label": locale.Switch.name,
109
110
  "aria-checked": checked,
@@ -38,6 +38,8 @@ type TabBarItemProps = Omit<TabBarItemType, 'key'> & {
38
38
  };
39
39
  export declare const TabBarItem: FC<TabBarItemProps>;
40
40
  export type TabBarProps = {
41
+ className?: string;
42
+ style?: React.CSSProperties;
41
43
  /**
42
44
  * @description 默认激活key
43
45
  */
@@ -51,7 +51,9 @@ export var TabBarItem = function TabBarItem(_ref) {
51
51
  }, label)));
52
52
  };
53
53
  export var TabBar = function TabBar(_ref2) {
54
- var activeKey = _ref2.activeKey,
54
+ var className = _ref2.className,
55
+ style = _ref2.style,
56
+ activeKey = _ref2.activeKey,
55
57
  defaultActiveKey = _ref2.defaultActiveKey,
56
58
  items = _ref2.items,
57
59
  children = _ref2.children,
@@ -70,7 +72,8 @@ export var TabBar = function TabBar(_ref2) {
70
72
  onTabClick: onClick
71
73
  }
72
74
  }, /*#__PURE__*/React.createElement("div", {
73
- className: classNames(tabBarCls)
75
+ className: classNames(tabBarCls, className),
76
+ style: style
74
77
  }, /*#__PURE__*/React.createElement("div", {
75
78
  className: classNames("".concat(tabBarCls, "-wrap"))
76
79
  }, !_.isEmpty(items) && items.map(function (item) {
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare const useIsomorphicUpdateLayoutEffect: typeof import("react").useEffect | typeof import("react").useLayoutEffect;
2
+ export declare const useIsomorphicUpdateLayoutEffect: typeof import("react").useLayoutEffect | typeof import("react").useEffect;
@@ -4,5 +4,5 @@ type Options<T> = {
4
4
  defaultValue: T;
5
5
  onChange?: (v: T) => void;
6
6
  };
7
- export declare function usePropsValue<T>(options: Options<T>): readonly [T, (this: unknown, v: SetStateAction<T>, forceTrigger?: boolean | undefined) => void];
7
+ export declare function usePropsValue<T>(options: Options<T>): readonly [T, (v: SetStateAction<T>, forceTrigger?: boolean) => void];
8
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trionesdev/antd-taro-react",
3
- "version": "0.0.1-beta.3",
3
+ "version": "0.0.1-beta.4",
4
4
  "description": "antd taro react ",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -102,5 +102,5 @@
102
102
  "optionalDependencies": {
103
103
  "@trionesdev/antd-taro-icons-react": "^0.0.1-beta.1"
104
104
  },
105
- "gitHead": "e40c2363a9ec15795e0caea702f2a2bf46da2b59"
105
+ "gitHead": "953e90e7f4bc98d4d14f32f823e592bed8aa1da8"
106
106
  }