@clayui/badge 3.40.0 → 3.56.0

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/README.md ADDED
@@ -0,0 +1,19 @@
1
+ # `@clayui/badge`
2
+
3
+ Badges help highlight important information, such as notifications or new and unread messages.
4
+
5
+ - [Documentation](https://clayui.com/docs/components/badge.html)
6
+ - [Changelog](./CHANGELOG.md)
7
+ - [Breaking change schedule](./BREAKING.md)
8
+
9
+ ## Install
10
+
11
+ Run `yarn`
12
+
13
+ ```shell
14
+ yarn add @clayui/badge
15
+ ```
16
+
17
+ ## Contribute
18
+
19
+ We'd love to get contributions from you! Please, check our [Contributing Guidelines](https://github.com/liferay/clay/blob/master/CONTRIBUTING.md) to see how you can help us improve.
package/lib/index.d.ts CHANGED
@@ -1,7 +1,17 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
3
+ * SPDX-License-Identifier: BSD-3-Clause
4
+ */
1
5
  import React from 'react';
2
6
  declare type DisplayType = 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning';
3
7
  interface IProps extends React.HTMLAttributes<HTMLSpanElement> {
8
+ /**
9
+ * Determines the color of the badge.
10
+ */
4
11
  displayType?: DisplayType;
12
+ /**
13
+ * Info that is shown inside of the badge itself.
14
+ */
5
15
  label?: string | number;
6
16
  }
7
17
  declare const ClayBadge: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLSpanElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clayui/badge",
3
- "version": "3.40.0",
3
+ "version": "3.56.0",
4
4
  "description": "ClayBadge component",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": "https://github.com/liferay/clay",
@@ -17,8 +17,8 @@
17
17
  ],
18
18
  "scripts": {
19
19
  "build": "cross-env NODE_ENV=production babel src --root-mode upward --out-dir lib --extensions .ts,.tsx",
20
- "build:types": "cross-env NODE_ENV=production tsc --project ./tsconfig.declarations.json",
21
- "prepublishOnly": "yarn build && yarn build:types",
20
+ "buildTypes": "cross-env NODE_ENV=production tsc --project ./tsconfig.declarations.json",
21
+ "prepublishOnly": "yarn build && yarn buildTypes",
22
22
  "test": "jest --config ../../jest.config.js"
23
23
  },
24
24
  "keywords": [
@@ -36,5 +36,5 @@
36
36
  "browserslist": [
37
37
  "extends browserslist-config-clay"
38
38
  ],
39
- "gitHead": "35f995fa7784af86b2052a542ae5d7b1eccfd356"
39
+ "gitHead": "1c33d9c709d8ce071862f0087c76ac23ce11465b"
40
40
  }
package/README.mdx DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- title: 'Badge'
3
- description: 'Badges help highlight important information, such as notifications or new and unread messages.'
4
- lexiconDefinition: 'https://liferay.design/lexicon/core-components/badges/'
5
- packageNpm: '@clayui/badge'
6
- ---
7
-
8
- import {Badge} from '$packages/clay-badge/docs/index';
9
-
10
- Badges are not used for non-numeric values. If you have a non-numeric value, use labels instead. Badges work for exact numbers up to 999.
11
- For numbers greater than 999, use K to indicate Thousands (5K for 5.231) and M to indicate Millions (2M for 2.100.523).
12
-
13
- <Badge />
14
-
15
- We recommend that you review the use cases in the <a href="https://storybook-clayui.netlify.com/?path=/story/claybadge--default">Storybook</a>.