x-ui-design 0.2.6 → 0.2.7
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.
|
@@ -5,7 +5,7 @@ import ButtonBase from './Button';
|
|
|
5
5
|
import { ButtonProps } from '../../types/button';
|
|
6
6
|
import { prefixClsButton } from '../../utils';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const ButtonClient = (props: ButtonProps) => {
|
|
9
9
|
const {
|
|
10
10
|
loading = false,
|
|
11
11
|
icon,
|
|
@@ -36,4 +36,4 @@ const MyButton = (props: ButtonProps) => {
|
|
|
36
36
|
return <ButtonBase {...props} isLoading={innerLoading} iconNode={iconNode} />;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export default
|
|
39
|
+
export default ButtonClient;
|
|
@@ -4,12 +4,7 @@ import { ButtonProps } from '../../types/button';
|
|
|
4
4
|
import { prefixClsButton } from '../../utils';
|
|
5
5
|
import './style.css';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
iconNode?: ReactNode;
|
|
9
|
-
isLoading?: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const ButtonBase = ({
|
|
7
|
+
const Button = ({
|
|
13
8
|
type = 'default',
|
|
14
9
|
variant = 'solid',
|
|
15
10
|
color = 'default',
|
|
@@ -31,7 +26,10 @@ const ButtonBase = ({
|
|
|
31
26
|
iconNode,
|
|
32
27
|
isLoading = false,
|
|
33
28
|
...restProps
|
|
34
|
-
}:
|
|
29
|
+
}: ButtonProps & {
|
|
30
|
+
iconNode?: ReactNode;
|
|
31
|
+
isLoading?: boolean;
|
|
32
|
+
}): ReactElement => {
|
|
35
33
|
const classes = clsx(
|
|
36
34
|
prefixCls,
|
|
37
35
|
rootClassName,
|
|
@@ -98,4 +96,4 @@ const ButtonBase = ({
|
|
|
98
96
|
);
|
|
99
97
|
};
|
|
100
98
|
|
|
101
|
-
export default
|
|
99
|
+
export default Button;
|
package/package.json
CHANGED
package/rollup.config.js
CHANGED