odaptos_design_system 2.0.0 → 2.0.1

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0",
2
+ "version": "2.0.1",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -79,3 +79,8 @@
79
79
  width: 1rem;
80
80
  }
81
81
  }
82
+ .canBeRemoved {
83
+ svg {
84
+ cursor: pointer;
85
+ }
86
+ }
@@ -23,6 +23,7 @@ interface TagProps extends HTMLAttributes<HTMLDivElement> {
23
23
  amountNumber?: number | undefined;
24
24
  customColor?: string;
25
25
  className?: string;
26
+ canBeRemoved?: boolean;
26
27
  }
27
28
 
28
29
  /** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=1359-33355&mode=dev */
@@ -35,6 +36,7 @@ export const Tag = ({
35
36
  amountNumber,
36
37
  customColor,
37
38
  className,
39
+ canBeRemoved = false,
38
40
  ...props
39
41
  }: TagProps) => {
40
42
  const tagCustomColor = customColor ? colord(customColor) : undefined;
@@ -86,7 +88,7 @@ export const Tag = ({
86
88
  style={{ backgroundColor: customColor }}
87
89
  className={`${styles.tag} ${getTagStatus()} ${getTagSize()} ${
88
90
  className ?? ''
89
- }`}
91
+ } ${canBeRemoved && styles.canBeRemoved}`}
90
92
  >
91
93
  {iconLeft &&
92
94
  React.cloneElement(iconLeft, {
@@ -234,10 +234,11 @@ export const MultiSelect = ({
234
234
  size="sm"
235
235
  status="info"
236
236
  key={`chipt-option-${index}`}
237
+ canBeRemoved
237
238
  iconRight={
238
239
  <RemoveCircledIcon
239
240
  fill={colors.blue_700}
240
- style={{ cursor: 'pointer' }}
241
+ style={{ cursor: 'pointer !important' }}
241
242
  onClick={() => deleteOption(option)}
242
243
  />
243
244
  }
@@ -256,6 +256,7 @@ export const MultiSelectWithCategories = ({
256
256
  size="sm"
257
257
  status="info"
258
258
  key={`chipt-option-${index}`}
259
+ canBeRemoved
259
260
  iconRight={
260
261
  <RemoveCircledIcon
261
262
  fill={colors.blue_700}