@dhis2-ui/chip 8.14.0 → 8.14.2-alpha.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.
Files changed (2) hide show
  1. package/package.json +6 -4
  2. package/types/index.d.ts +33 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/chip",
3
- "version": "8.14.0",
3
+ "version": "8.14.2-alpha.1",
4
4
  "description": "UI Chip",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,16 +32,18 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@dhis2/prop-types": "^3.1.2",
35
- "@dhis2/ui-constants": "8.14.0",
35
+ "@dhis2/ui-constants": "8.14.2-alpha.1",
36
36
  "classnames": "^2.3.1",
37
37
  "prop-types": "^15.7.2"
38
38
  },
39
39
  "files": [
40
- "build"
40
+ "build",
41
+ "types"
41
42
  ],
42
43
  "devDependencies": {
43
44
  "react": "16.13",
44
45
  "react-dom": "16.13",
45
46
  "styled-jsx": "^4.0.1"
46
- }
47
+ },
48
+ "types": "types"
47
49
  }
@@ -0,0 +1,33 @@
1
+ import * as React from 'react'
2
+
3
+ export interface ChipProps {
4
+ children?: React.ReactNode
5
+ className?: string
6
+ dataTest?: string
7
+ dense?: boolean
8
+ disabled?: boolean
9
+ dragging?: boolean
10
+ icon?: React.ReactElement<any>
11
+ /**
12
+ * `margin-bottom` value, applied in `px`
13
+ */
14
+ marginBottom?: number
15
+ /**
16
+ * `margin-left` value, applied in `px`
17
+ */
18
+ marginLeft?: number
19
+ /**
20
+ * `margin-right` value, applied in `px`
21
+ */
22
+ marginRight?: number
23
+ /**
24
+ * `margin-top` value, applied in `px`
25
+ */
26
+ marginTop?: number
27
+ overflow?: boolean
28
+ selected?: boolean
29
+ onClick?: (arg0: {}, arg1: React.MouseEvent<HTMLSpanElement>) => void
30
+ onRemove?: (arg0: {}, arg1: React.MouseEvent<HTMLSpanElement>) => void
31
+ }
32
+
33
+ export const Chip: React.FC<ChipProps>