@cleartrip/ct-design-vertical-ticker 5.26.0-SNAPSHOT-native-main.0 → 5.26.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalTicker.native.d.ts","sourceRoot":"","sources":["../packages/components/VerticalTicker/src/VerticalTicker.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"VerticalTicker.native.d.ts","sourceRoot":"","sources":["../packages/components/VerticalTicker/src/VerticalTicker.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmElD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/dist/type.d.ts
CHANGED
package/dist/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/VerticalTicker/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,oBAAoB;IAEnC,QAAQ,EAAE,SAAS,EAAE,CAAC;IAEtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/VerticalTicker/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,oBAAoB;IAEnC,QAAQ,EAAE,SAAS,EAAE,CAAC;IAEtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,OAAO,CAAC;IAKf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleartrip/ct-design-vertical-ticker",
|
|
3
|
-
"version": "5.26.0
|
|
3
|
+
"version": "5.26.0",
|
|
4
4
|
"description": "VerticalTicker Component",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"react-native": "src/index.native.ts",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"src"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cleartrip/ct-design-container": "5.26.0
|
|
21
|
-
"@cleartrip/ct-design-theme": "5.26.0
|
|
22
|
-
"@cleartrip/ct-design-style-manager": "5.
|
|
20
|
+
"@cleartrip/ct-design-container": "5.26.0",
|
|
21
|
+
"@cleartrip/ct-design-theme": "5.26.0",
|
|
22
|
+
"@cleartrip/ct-design-style-manager": "5.26.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": ">=16.8.0",
|
|
@@ -7,7 +7,7 @@ import { useStyles } from '@cleartrip/ct-design-style-manager';
|
|
|
7
7
|
import { staticTickerStyles } from './style';
|
|
8
8
|
import { IVerticalTickerProps } from './type';
|
|
9
9
|
|
|
10
|
-
const VerticalTicker: React.FC<IVerticalTickerProps> = ({ elements, delay = 3000, height, loop = true }) => {
|
|
10
|
+
const VerticalTicker: React.FC<IVerticalTickerProps> = ({ elements, delay = 3000, height, loop = true, testID }) => {
|
|
11
11
|
const clonedFirstElem = React.cloneElement(elements[0] as React.ReactElement, {
|
|
12
12
|
key: 'clone-fist-elem',
|
|
13
13
|
});
|
|
@@ -67,7 +67,10 @@ const VerticalTicker: React.FC<IVerticalTickerProps> = ({ elements, delay = 3000
|
|
|
67
67
|
}));
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
|
-
<Container
|
|
70
|
+
<Container
|
|
71
|
+
testID={testID ? `${testID}-VerticalTicker` : undefined}
|
|
72
|
+
styleConfig={{ root: [staticTickerStyles.root, containerStyles.root] }}
|
|
73
|
+
>
|
|
71
74
|
<Animated.View style={animatedStyle}>{elementList.map((element) => element)}</Animated.View>
|
|
72
75
|
</Container>
|
|
73
76
|
);
|
package/src/type.ts
CHANGED
|
@@ -9,4 +9,9 @@ export interface IVerticalTickerProps {
|
|
|
9
9
|
height: number;
|
|
10
10
|
/** Whether the ticker should loop continuously (optional) */
|
|
11
11
|
loop?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Identifier used to locate this component in end-to-end tests.
|
|
14
|
+
* Forwarded to the underlying React Native view.
|
|
15
|
+
*/
|
|
16
|
+
testID?: string;
|
|
12
17
|
}
|