@faststore/components 2.1.1 → 2.1.9
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.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from 'react';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
export type ProductTitleProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
3
|
+
export interface ProductTitleProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
5
4
|
/**
|
|
6
5
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
7
6
|
*/
|
|
@@ -26,31 +25,6 @@ export type ProductTitleProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
|
26
25
|
* The current value of the rating, a number from 0 to 5.
|
|
27
26
|
*/
|
|
28
27
|
ratingValue?: number;
|
|
29
|
-
}
|
|
30
|
-
declare const ProductTitle: React.ForwardRefExoticComponent<
|
|
31
|
-
/**
|
|
32
|
-
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
33
|
-
*/
|
|
34
|
-
testId?: string | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* A react component to be used as the product title, e.g. a `h1`
|
|
37
|
-
*/
|
|
38
|
-
title: ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* A react component to be used as the product label, e.g. a `DiscountBadge`
|
|
41
|
-
*/
|
|
42
|
-
label?: ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* Label for reference.
|
|
45
|
-
*/
|
|
46
|
-
refTag?: string | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* A text to be used below the title and the label, such as the product's reference number.
|
|
49
|
-
*/
|
|
50
|
-
refNumber?: string | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* The current value of the rating, a number from 0 to 5.
|
|
53
|
-
*/
|
|
54
|
-
ratingValue?: number | undefined;
|
|
55
|
-
} & Omit<RatingProps, "value" | "title" | "testId" | "onChange"> & React.RefAttributes<HTMLElement>>;
|
|
28
|
+
}
|
|
29
|
+
declare const ProductTitle: React.ForwardRefExoticComponent<ProductTitleProps & React.RefAttributes<HTMLElement>>;
|
|
56
30
|
export default ProductTitle;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/components",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"module": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"author": "Emerson Laurentino @emersonlaurentino",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"src"
|
|
22
22
|
],
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@faststore/eslint-config": "^2.1.
|
|
25
|
-
"@faststore/shared": "^2.1.
|
|
24
|
+
"@faststore/eslint-config": "^2.1.9",
|
|
25
|
+
"@faststore/shared": "^2.1.9",
|
|
26
26
|
"eslint": "7.32.0",
|
|
27
27
|
"typescript": "^4.8.4"
|
|
28
28
|
},
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"node": "16.18.0",
|
|
31
31
|
"yarn": "1.19.1"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "e8c0051ff4e990fcf9375bc8a22f76570967e1af"
|
|
34
34
|
}
|
|
@@ -2,9 +2,9 @@ import React, { forwardRef, HTMLAttributes } from 'react'
|
|
|
2
2
|
import type { ReactNode } from 'react'
|
|
3
3
|
|
|
4
4
|
import { Rating } from '../../'
|
|
5
|
-
import type { RatingProps } from '../../'
|
|
6
5
|
|
|
7
|
-
export
|
|
6
|
+
export interface ProductTitleProps
|
|
7
|
+
extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
8
8
|
/**
|
|
9
9
|
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
10
10
|
*/
|
|
@@ -29,7 +29,7 @@ export type ProductTitleProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
|
29
29
|
* The current value of the rating, a number from 0 to 5.
|
|
30
30
|
*/
|
|
31
31
|
ratingValue?: number
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
const ProductTitle = forwardRef<HTMLElement, ProductTitleProps>(
|
|
35
35
|
function ProductTitle(
|