@dhis2-ui/notice-box 8.16.0 → 9.0.0-alpha.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.
Files changed (2) hide show
  1. package/package.json +8 -5
  2. package/types/index.d.ts +22 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/notice-box",
3
- "version": "8.16.0",
3
+ "version": "9.0.0-alpha.2",
4
4
  "description": "UI NoticeBox",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,6 +13,7 @@
13
13
  "main": "./build/cjs/index.js",
14
14
  "module": "./build/es/index.js",
15
15
  "exports": {
16
+ "types": "./types/index.d.ts",
16
17
  "import": "./build/es/index.js",
17
18
  "require": "./build/cjs/index.js"
18
19
  },
@@ -32,17 +33,19 @@
32
33
  },
33
34
  "dependencies": {
34
35
  "@dhis2/prop-types": "^3.1.2",
35
- "@dhis2/ui-constants": "8.16.0",
36
- "@dhis2/ui-icons": "8.16.0",
36
+ "@dhis2/ui-constants": "9.0.0-alpha.2",
37
+ "@dhis2/ui-icons": "9.0.0-alpha.2",
37
38
  "classnames": "^2.3.1",
38
39
  "prop-types": "^15.7.2"
39
40
  },
40
41
  "files": [
41
- "build"
42
+ "build",
43
+ "types"
42
44
  ],
43
45
  "devDependencies": {
44
46
  "react": "16.13",
45
47
  "react-dom": "16.13",
46
48
  "styled-jsx": "^4.0.1"
47
- }
49
+ },
50
+ "types": "types"
48
51
  }
@@ -0,0 +1,22 @@
1
+ import * as React from 'react'
2
+
3
+ export interface NoticeBoxProps {
4
+ children?: React.ReactNode
5
+ className?: string
6
+ dataTest?: string
7
+ /**
8
+ * Applies 'error' message styles. Mutually exclusive with the `valid` and `warning` props
9
+ */
10
+ error?: boolean
11
+ title?: string
12
+ /**
13
+ * Applies 'valid' message styles. Mutually exclusive with the `error` and `warning` props
14
+ */
15
+ valid?: boolean
16
+ /**
17
+ * Applies 'warning' message styles. Mutually exclusive with the `error` and `valid` props
18
+ */
19
+ warning?: boolean
20
+ }
21
+
22
+ export const NoticeBox: React.FC<NoticeBoxProps>