sprint-asia-custom-component 0.1.66 → 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 CHANGED
@@ -349,26 +349,24 @@
349
349
  type = "success",
350
350
  onClick
351
351
  }) => {
352
- return /*#__PURE__*/React__default["default"].createElement("div", {
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
- ${type == "neutral" && "text-neutral300 border-neutral300 bg-neutral30 cursor-pointer"}
358
- ${type == "success" && "text-success600 border-success600 bg-success50"}
359
- ${type == "primary" && "text-primary500 border-primary500 bg-primary50"}
360
- ${type == "dropdown" && "text-primary500 border-primary500 bg-primary50"}
361
- ${type == "warning" && "text-warning800 border-warning800 bg-warning50"}
362
- ${type == "danger" && "text-danger800 border-danger800 bg-danger50"}
363
- ' rounded-full text-xs border-2 flex items-center px-3.5`
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 justify-center"
363
+ className: "flex items-center"
366
364
  }, /*#__PURE__*/React__default["default"].createElement("p", {
367
- className: "py-1 text-center"
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,7 +1,7 @@
1
1
  {
2
2
  "name": "sprint-asia-custom-component",
3
3
  "main": "dist/index.js",
4
- "version": "0.1.66",
4
+ "version": "0.1.68",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -1,30 +1,28 @@
1
- import React from 'react'
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
- <div className='w-fit' onClick={onClick}>
10
- <div className={`
11
- ${type == "neutral" && "text-neutral300 border-neutral300 bg-neutral30 cursor-pointer"}
12
- ${type == "success" && "text-success600 border-success600 bg-success50"}
13
- ${type == "primary" && "text-primary500 border-primary500 bg-primary50"}
14
- ${type == "dropdown" && "text-primary500 border-primary500 bg-primary50"}
15
- ${type == "warning" && "text-warning800 border-warning800 bg-warning50"}
16
- ${type == "danger" && "text-danger800 border-danger800 bg-danger50"}
17
- ' rounded-full text-xs border-2 flex items-center px-3.5`}>
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
- <div className='flex items-center justify-center'>
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;