@team-monolith/cds 1.88.1 → 1.88.2
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,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
13
|
/** @jsxImportSource @emotion/react */
|
|
3
14
|
import { css, useTheme } from "@emotion/react";
|
|
@@ -86,8 +97,9 @@ const COLOR_TO_BACKGROUND_IMAGE = (theme, color) => ({
|
|
|
86
97
|
* 반짝이는 애니메이션 효과가 적용된 Button 컴포넌트
|
|
87
98
|
*/
|
|
88
99
|
export function AnimatedButton(props) {
|
|
100
|
+
const { color, loading, disabled } = props, _other = __rest(props, ["color", "loading", "disabled"]);
|
|
89
101
|
const theme = useTheme();
|
|
90
|
-
return (_jsx(Button, Object.assign({}, props, { css: [
|
|
102
|
+
return (_jsx(Button, Object.assign({}, props, { css: disabled || loading ? [] : [
|
|
91
103
|
css `
|
|
92
104
|
background-size: 400% 100%;
|
|
93
105
|
animation: AnimateBG 2s linear infinite;
|
|
@@ -100,7 +112,7 @@ export function AnimatedButton(props) {
|
|
|
100
112
|
}
|
|
101
113
|
}
|
|
102
114
|
`,
|
|
103
|
-
COLOR_TO_BACKGROUND_IMAGE(theme,
|
|
115
|
+
COLOR_TO_BACKGROUND_IMAGE(theme, color)
|
|
104
116
|
] })));
|
|
105
117
|
}
|
|
106
118
|
;
|