@bpds-test/react-benefit-tag 1.0.0 → 1.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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/index.tsx +0 -37
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpds-test/react-benefit-tag",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -15,7 +15,8 @@
15
15
  "license": "ISC",
16
16
  "author": "",
17
17
  "type": "commonjs",
18
- "main": "index.tsx",
18
+ "main": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
19
20
  "files": [
20
21
  "dist"
21
22
  ],
package/index.tsx DELETED
@@ -1,37 +0,0 @@
1
- import { FC } from "react";
2
- import { tv } from "tailwind-variants";
3
-
4
- const generateClasses = tv({
5
- base: "preflight inline-block px-0.5 rounded-sm",
6
- variants: {
7
- variant: {
8
- product: "text-clr-white bg-clr-black",
9
- price: "text-clr-on-sale bg-clr-sale",
10
- social: "text-clr-on-bg-high bg-clr-bg-disabled",
11
- voucher: "text-clr-on-voucher bg-clr-voucher",
12
- },
13
- size: {
14
- small: "typography-flag-small-text",
15
- large: "typography-flag-large-text",
16
- },
17
- },
18
- });
19
-
20
- export interface Props {
21
- /** Describes the benefit. */
22
- children: string;
23
- /** Type or category of the benefit. Depending on the chosen value, the visual appearance of the component will adjust appropriately. */
24
- variant?: "product" | "price" | "social" | "voucher";
25
- /** One of two possible component sizes, which should be used depending on the context. */
26
- size?: "large" | "small";
27
- }
28
-
29
- const BenefitTag: FC<Props> = ({ children, variant = "product", size = "large" }) => {
30
- return (
31
- <p className={generateClasses({ variant, size })} data-bpds="benefit-tag">
32
- {children}
33
- </p>
34
- );
35
- };
36
-
37
- export default BenefitTag;