sprint-asia-custom-component 0.1.67 → 0.1.68
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.
- package/dist/index.js +12 -14
- package/package.json +1 -1
- package/src/components/chip/index.js +25 -27
package/dist/index.js
CHANGED
|
@@ -349,26 +349,24 @@
|
|
|
349
349
|
type = "success",
|
|
350
350
|
onClick
|
|
351
351
|
}) => {
|
|
352
|
-
return /*#__PURE__*/React__default["default"].createElement("
|
|
353
|
-
className: "w-fit",
|
|
354
|
-
onClick: onClick
|
|
355
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
352
|
+
return /*#__PURE__*/React__default["default"].createElement("a", {
|
|
356
353
|
className: `
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
354
|
+
${type == "neutral" && "text-neutral300 border-neutral300 bg-neutral30 cursor-pointer"}
|
|
355
|
+
${type == "success" && "text-success600 border-success600 bg-success50"}
|
|
356
|
+
${type == "primary" && "text-primary500 border-primary500 bg-primary50"}
|
|
357
|
+
${type == "dropdown" && "text-primary500 border-primary500 bg-primary50"}
|
|
358
|
+
${type == "warning" && "text-warning800 border-warning800 bg-warning50"}
|
|
359
|
+
${type == "danger" && "text-danger800 border-danger800 bg-danger50"}
|
|
360
|
+
' rounded-full text-xs border-2 flex items-center px-3.5 justify-center`,
|
|
361
|
+
onClick: onClick
|
|
364
362
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
365
|
-
className: "flex items-center
|
|
363
|
+
className: "flex items-center"
|
|
366
364
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
367
|
-
className: "py-1
|
|
365
|
+
className: "py-1"
|
|
368
366
|
}, title), type == "dropdown" && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
369
367
|
className: "text-md pl-2 cursor-pointer",
|
|
370
368
|
onClick: onClick
|
|
371
|
-
}, "x")))
|
|
369
|
+
}, "x")));
|
|
372
370
|
};
|
|
373
371
|
|
|
374
372
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
package/package.json
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
|
|
3
|
-
const Chip = ({
|
|
4
|
-
title = "Approve",
|
|
5
|
-
type = "success",
|
|
6
|
-
onClick
|
|
7
|
-
}) => {
|
|
3
|
+
const Chip = ({ title = "Approve", type = "success", onClick }) => {
|
|
8
4
|
return (
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
<a
|
|
6
|
+
className={`
|
|
7
|
+
${type == "neutral" && "text-neutral300 border-neutral300 bg-neutral30 cursor-pointer"}
|
|
8
|
+
${type == "success" && "text-success600 border-success600 bg-success50"}
|
|
9
|
+
${type == "primary" && "text-primary500 border-primary500 bg-primary50"}
|
|
10
|
+
${type == "dropdown" && "text-primary500 border-primary500 bg-primary50"}
|
|
11
|
+
${type == "warning" && "text-warning800 border-warning800 bg-warning50"}
|
|
12
|
+
${type == "danger" && "text-danger800 border-danger800 bg-danger50"}
|
|
13
|
+
' rounded-full text-xs border-2 flex items-center px-3.5 justify-center`}
|
|
14
|
+
onClick={onClick}
|
|
15
|
+
>
|
|
16
|
+
<div className="flex items-center">
|
|
17
|
+
<p className="py-1">{title}</p>
|
|
18
|
+
{type == "dropdown" && (
|
|
19
|
+
<p className="text-md pl-2 cursor-pointer" onClick={onClick}>
|
|
20
|
+
x
|
|
21
|
+
</p>
|
|
22
|
+
)}
|
|
23
|
+
</div>
|
|
24
|
+
</a>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
<p className='py-1 text-center'>{title}</p>
|
|
21
|
-
{
|
|
22
|
-
type == "dropdown" && <p className='text-md pl-2 cursor-pointer' onClick={onClick}>x</p>
|
|
23
|
-
}
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export default Chip
|
|
28
|
+
export default Chip;
|