@proximus/lavender-skeleton-native 0.1.0-alpha.2 → 0.1.0-alpha.8
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/package.json +9 -35
- package/CHANGELOG.md +0 -14
- package/dist/far/away/package.json +0 -33
- package/src/CardSkeleton.tsx +0 -29
- package/src/CarouselSkeleton.tsx +0 -50
- package/src/DataUsageSkeleton.tsx +0 -45
- package/src/MessageCardSkeleton.tsx +0 -43
- package/src/Skeleton.tsx +0 -187
- package/src/StatusSkeleton.tsx +0 -21
- package/src/TileSkeleton.tsx +0 -46
- package/src/index.ts +0 -7
- package/src/types.ts +0 -6
- package/tsconfig.json +0 -8
package/package.json
CHANGED
|
@@ -1,44 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-skeleton-native",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"description": "Lavender skeleton component",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"main": "
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"prepublish": "yarn clean && yarn transform-package-json && yarn build",
|
|
11
|
-
"build": "npx tsc -p tsconfig.json"
|
|
12
|
-
},
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
13
10
|
"peerDependencies": {
|
|
14
|
-
"@proximus/lavender-common-native": "
|
|
15
|
-
"@proximus/lavender-styling-native": "
|
|
16
|
-
"@proximus/lavender-texts-native": "
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@proximus/lavender-common-native": "0.1.0-alpha.6",
|
|
20
|
-
"@proximus/lavender-styling-native": "0.1.0-alpha.5",
|
|
21
|
-
"@proximus/lavender-texts-native": "0.1.0-alpha.6"
|
|
11
|
+
"@proximus/lavender-common-native": "*",
|
|
12
|
+
"@proximus/lavender-styling-native": "*",
|
|
13
|
+
"@proximus/lavender-texts-native": "*"
|
|
22
14
|
},
|
|
23
15
|
"publishConfig": {
|
|
24
16
|
"access": "public"
|
|
25
|
-
}
|
|
26
|
-
"lerna": {
|
|
27
|
-
"command": {
|
|
28
|
-
"publish": {
|
|
29
|
-
"assets": [
|
|
30
|
-
{
|
|
31
|
-
"from": "dist/far/away/package.json",
|
|
32
|
-
"to": "."
|
|
33
|
-
},
|
|
34
|
-
"dist/*.js",
|
|
35
|
-
"dist/*.d.ts",
|
|
36
|
-
"dist/*.d.ts.map",
|
|
37
|
-
"src",
|
|
38
|
-
"package.json"
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
|
|
17
|
+
}
|
|
44
18
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [0.1.0-alpha.2](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-skeleton-native@0.1.0-alpha.1...@proximus/lavender-skeleton-native@0.1.0-alpha.2) (2025-09-26)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @proximus/lavender-skeleton-native
|
|
9
|
-
|
|
10
|
-
# [0.1.0-alpha.1](https://github.com/Pxs-Corporate/react-native-lavender/compare/@proximus/lavender-skeleton-native@0.1.0-alpha.0...@proximus/lavender-skeleton-native@0.1.0-alpha.1) (2025-09-25)
|
|
11
|
-
|
|
12
|
-
### Bug Fixes
|
|
13
|
-
|
|
14
|
-
- **BCRI-000000:** no free space on gh runner during build ([#27](https://github.com/Pxs-Corporate/react-native-lavender/issues/27)) ([a7c8604](https://github.com/Pxs-Corporate/react-native-lavender/commit/a7c86043b5cefcb10fd768d449c5718fbabe87ec))
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@proximus/lavender-skeleton-native",
|
|
3
|
-
"version": "0.1.0-alpha.2",
|
|
4
|
-
"description": "Lavender skeleton component",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"peerDependencies": {
|
|
8
|
-
"@proximus/lavender-common-native": "*",
|
|
9
|
-
"@proximus/lavender-styling-native": "*",
|
|
10
|
-
"@proximus/lavender-texts-native": "*"
|
|
11
|
-
},
|
|
12
|
-
"publishConfig": {
|
|
13
|
-
"access": "public"
|
|
14
|
-
},
|
|
15
|
-
"lerna": {
|
|
16
|
-
"command": {
|
|
17
|
-
"publish": {
|
|
18
|
-
"assets": [
|
|
19
|
-
{
|
|
20
|
-
"from": "dist/far/away/package.json",
|
|
21
|
-
"to": "."
|
|
22
|
-
},
|
|
23
|
-
"dist/*.js",
|
|
24
|
-
"dist/*.d.ts",
|
|
25
|
-
"dist/*.d.ts.map",
|
|
26
|
-
"src",
|
|
27
|
-
"package.json"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"gitHead": "e50a17526561b3eafb159e36c737173956093e0d"
|
|
33
|
-
}
|
package/src/CardSkeleton.tsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { PxSkeleton } from './Skeleton';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useTheme } from '@proximus/lavender-styling-native';
|
|
5
|
-
import { ISkeletonProps } from './types';
|
|
6
|
-
|
|
7
|
-
export function PxCardSkeleton({ inverted, containerStyle }: ISkeletonProps) {
|
|
8
|
-
const { theme } = useTheme();
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<View
|
|
12
|
-
style={[containerStyle, { borderRadius: theme.t('RadiusMain').number }]}
|
|
13
|
-
>
|
|
14
|
-
<PxSkeleton variant={'assetL'} inverted={inverted} expand />
|
|
15
|
-
<View
|
|
16
|
-
style={{
|
|
17
|
-
gap: theme.t('SpacingSMobile').number,
|
|
18
|
-
borderBottomEndRadius: theme.t('RadiusMain').number,
|
|
19
|
-
borderBottomStartRadius: theme.t('RadiusMain').number,
|
|
20
|
-
padding: theme.t('PaddingSMobile').number,
|
|
21
|
-
backgroundColor: theme.t('ColorBackgroundSurfaceLight'),
|
|
22
|
-
}}
|
|
23
|
-
>
|
|
24
|
-
<PxSkeleton variant={'headingS'} inverted={inverted} />
|
|
25
|
-
<PxSkeleton variant={'body'} inverted={inverted} />
|
|
26
|
-
</View>
|
|
27
|
-
</View>
|
|
28
|
-
);
|
|
29
|
-
}
|
package/src/CarouselSkeleton.tsx
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { PxSkeleton } from './Skeleton';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useTheme } from '@proximus/lavender-styling-native';
|
|
5
|
-
import { ISkeletonProps } from './types';
|
|
6
|
-
|
|
7
|
-
export function PxCarouselSkeleton({
|
|
8
|
-
inverted,
|
|
9
|
-
itemsVisible = 1,
|
|
10
|
-
containerStyle,
|
|
11
|
-
}: {
|
|
12
|
-
itemsVisible?: number;
|
|
13
|
-
} & ISkeletonProps) {
|
|
14
|
-
const { theme } = useTheme();
|
|
15
|
-
|
|
16
|
-
const panelVariant = itemsVisible === 1 ? 'panel' : 'panelS';
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<View
|
|
20
|
-
style={[
|
|
21
|
-
containerStyle,
|
|
22
|
-
{
|
|
23
|
-
gap: theme.t('SpacingSMobile').number,
|
|
24
|
-
borderRadius: theme.t('RadiusMain').number,
|
|
25
|
-
},
|
|
26
|
-
]}
|
|
27
|
-
>
|
|
28
|
-
<View
|
|
29
|
-
style={{
|
|
30
|
-
flexDirection: 'row',
|
|
31
|
-
gap: theme.t('SpacingSMobile').number,
|
|
32
|
-
overflow: 'hidden',
|
|
33
|
-
}}
|
|
34
|
-
>
|
|
35
|
-
<PxSkeleton inverted={inverted} variant={panelVariant} />
|
|
36
|
-
<PxSkeleton inverted={inverted} variant={panelVariant} />
|
|
37
|
-
<PxSkeleton inverted={inverted} variant={panelVariant} />
|
|
38
|
-
</View>
|
|
39
|
-
|
|
40
|
-
<View
|
|
41
|
-
style={{
|
|
42
|
-
justifyContent: 'center',
|
|
43
|
-
flexDirection: 'row',
|
|
44
|
-
}}
|
|
45
|
-
>
|
|
46
|
-
<PxSkeleton inverted={inverted} variant={'body'} />
|
|
47
|
-
</View>
|
|
48
|
-
</View>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { PxSkeleton } from './Skeleton';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useTheme } from '@proximus/lavender-styling-native';
|
|
5
|
-
import { PxStatusSkeleton } from './StatusSkeleton';
|
|
6
|
-
import { ISkeletonProps } from './types';
|
|
7
|
-
|
|
8
|
-
export function PxDataUsageSkeleton({
|
|
9
|
-
inverted,
|
|
10
|
-
containerStyle,
|
|
11
|
-
}: ISkeletonProps) {
|
|
12
|
-
const { theme } = useTheme();
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<View
|
|
16
|
-
style={[
|
|
17
|
-
containerStyle,
|
|
18
|
-
{
|
|
19
|
-
gap: theme.t('SpacingDefaultMobile').number,
|
|
20
|
-
borderRadius: theme.t('RadiusMain').number,
|
|
21
|
-
padding: theme.t('PaddingSMobile').number,
|
|
22
|
-
backgroundColor: theme.t('ColorBackgroundSurfaceLight'),
|
|
23
|
-
},
|
|
24
|
-
]}
|
|
25
|
-
>
|
|
26
|
-
<View
|
|
27
|
-
style={{
|
|
28
|
-
gap: theme.t('SpacingXsMobile').number,
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
<PxSkeleton variant={'headingS'} inverted={inverted} />
|
|
32
|
-
<PxSkeleton variant={'body'} inverted={inverted} />
|
|
33
|
-
</View>
|
|
34
|
-
<View
|
|
35
|
-
style={{
|
|
36
|
-
gap: theme.t('SpacingXsMobile').number,
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<PxSkeleton variant={'headingS'} inverted={inverted} />
|
|
40
|
-
<PxSkeleton variant={'body'} inverted={inverted} expand />
|
|
41
|
-
<PxStatusSkeleton />
|
|
42
|
-
</View>
|
|
43
|
-
</View>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { PxSkeleton } from './Skeleton';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useTheme } from '@proximus/lavender-styling-native';
|
|
5
|
-
import { ISkeletonProps } from './types';
|
|
6
|
-
|
|
7
|
-
export function PxMessageCardSkeleton({
|
|
8
|
-
inverted,
|
|
9
|
-
containerStyle,
|
|
10
|
-
}: ISkeletonProps) {
|
|
11
|
-
const { theme } = useTheme();
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<View
|
|
15
|
-
style={[
|
|
16
|
-
containerStyle,
|
|
17
|
-
{
|
|
18
|
-
backgroundColor: theme.t('ColorBackgroundSurfaceLight'),
|
|
19
|
-
borderRadius: theme.t('RadiusMain').number,
|
|
20
|
-
padding: theme.t('PaddingSMobile').number,
|
|
21
|
-
gap: theme.t('SpacingSMobile').number,
|
|
22
|
-
},
|
|
23
|
-
]}
|
|
24
|
-
>
|
|
25
|
-
<View
|
|
26
|
-
style={{
|
|
27
|
-
flexDirection: 'row',
|
|
28
|
-
gap: theme.t('SpacingSMobile').number,
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
<PxSkeleton variant={'assetS'} inverted={inverted} />
|
|
32
|
-
<View style={{ flex: 1, gap: theme.t('SpacingSMobile').number }}>
|
|
33
|
-
<PxSkeleton variant={'headingS'} inverted={inverted} />
|
|
34
|
-
<PxSkeleton variant={'body'} inverted={inverted} />
|
|
35
|
-
</View>
|
|
36
|
-
<PxSkeleton variant={'actionS'} inverted={inverted} />
|
|
37
|
-
</View>
|
|
38
|
-
<View>
|
|
39
|
-
<PxSkeleton variant={'actionL'} inverted={inverted} />
|
|
40
|
-
</View>
|
|
41
|
-
</View>
|
|
42
|
-
);
|
|
43
|
-
}
|
package/src/Skeleton.tsx
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Animated,
|
|
4
|
-
Easing,
|
|
5
|
-
LayoutChangeEvent,
|
|
6
|
-
StyleProp,
|
|
7
|
-
StyleSheet,
|
|
8
|
-
View,
|
|
9
|
-
ViewProps,
|
|
10
|
-
ViewStyle,
|
|
11
|
-
} from 'react-native';
|
|
12
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
13
|
-
import { useTheme } from '@proximus/lavender-styling-native';
|
|
14
|
-
|
|
15
|
-
const DURATION = 1500;
|
|
16
|
-
const ANGLE = 18;
|
|
17
|
-
|
|
18
|
-
export type SkeletonGradientProps = ViewProps & {
|
|
19
|
-
/** Predefined shape */
|
|
20
|
-
variant:
|
|
21
|
-
| 'headingS'
|
|
22
|
-
| 'headingM'
|
|
23
|
-
| 'headingL'
|
|
24
|
-
| 'body'
|
|
25
|
-
| 'bodyS'
|
|
26
|
-
| 'actionS'
|
|
27
|
-
| 'actionL'
|
|
28
|
-
| 'assetXS'
|
|
29
|
-
| 'assetS'
|
|
30
|
-
| 'assetL'
|
|
31
|
-
| 'panel'
|
|
32
|
-
| 'panelS';
|
|
33
|
-
width?: number | string;
|
|
34
|
-
containerStyle?: StyleProp<ViewStyle>;
|
|
35
|
-
expand?: boolean;
|
|
36
|
-
inverted?: boolean;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
function useColors({ inverted }: { inverted: boolean }) {
|
|
40
|
-
const { theme } = useTheme();
|
|
41
|
-
const invertedSuffix = inverted ? 'Inverted' : 'Default';
|
|
42
|
-
const backgroundColor = theme.t(
|
|
43
|
-
`ColorBackgroundStateDisabled${invertedSuffix}`
|
|
44
|
-
);
|
|
45
|
-
const highlightColor = inverted ? 'rgba(0,0,0,1)' : 'rgba(255,255,255,1)';
|
|
46
|
-
const highlightColorWithOpacity = inverted
|
|
47
|
-
? 'rgba(0,0,0,0.24)'
|
|
48
|
-
: 'rgba(255,255,250,.24)';
|
|
49
|
-
return { backgroundColor, highlightColor, highlightColorWithOpacity };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function PxSkeleton(props: SkeletonGradientProps) {
|
|
53
|
-
const { inverted = false, containerStyle, variant, expand = false } = props;
|
|
54
|
-
const [layout, setLayout] = useState({ width: 0, height: 0 });
|
|
55
|
-
const translateX = useRef(new Animated.Value(0)).current;
|
|
56
|
-
const { theme } = useTheme();
|
|
57
|
-
const { backgroundColor, highlightColor, highlightColorWithOpacity } =
|
|
58
|
-
useColors({ inverted });
|
|
59
|
-
const loopRef = useRef<Animated.CompositeAnimation | null>(null);
|
|
60
|
-
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (layout.width <= 0) return;
|
|
63
|
-
|
|
64
|
-
// Stop any previous loop before starting a new one
|
|
65
|
-
loopRef.current?.stop();
|
|
66
|
-
|
|
67
|
-
translateX.setValue(-layout.width * 1.5);
|
|
68
|
-
|
|
69
|
-
const loop = Animated.loop(
|
|
70
|
-
Animated.timing(translateX, {
|
|
71
|
-
toValue: layout.width,
|
|
72
|
-
easing: Easing.cubic,
|
|
73
|
-
duration: DURATION,
|
|
74
|
-
useNativeDriver: true,
|
|
75
|
-
})
|
|
76
|
-
);
|
|
77
|
-
loopRef.current = loop;
|
|
78
|
-
loop.start();
|
|
79
|
-
return () => {
|
|
80
|
-
loop.stop();
|
|
81
|
-
loopRef.current = null;
|
|
82
|
-
};
|
|
83
|
-
}, [translateX, layout]);
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<View
|
|
87
|
-
style={[
|
|
88
|
-
containerStyle,
|
|
89
|
-
{
|
|
90
|
-
backgroundColor,
|
|
91
|
-
borderRadius: ['actionS', 'actionL'].includes(variant)
|
|
92
|
-
? theme.t('RadiusPill').number
|
|
93
|
-
: theme.t('RadiusMain').number,
|
|
94
|
-
overflow: 'hidden',
|
|
95
|
-
},
|
|
96
|
-
styles[props.variant],
|
|
97
|
-
{ ...(expand ? { width: '100%', maxWidth: undefined } : undefined) },
|
|
98
|
-
]}
|
|
99
|
-
onLayout={(e: LayoutChangeEvent) => {
|
|
100
|
-
const { width, height } = e.nativeEvent.layout;
|
|
101
|
-
setLayout({ width, height });
|
|
102
|
-
}}
|
|
103
|
-
>
|
|
104
|
-
<Animated.View
|
|
105
|
-
style={{
|
|
106
|
-
position: 'absolute',
|
|
107
|
-
|
|
108
|
-
top: -3 * layout.height, // ensure coverage when rotated
|
|
109
|
-
bottom: -3 * layout.height,
|
|
110
|
-
width: layout.width,
|
|
111
|
-
transform: [{ translateX }, { rotate: `${ANGLE}deg` }],
|
|
112
|
-
}}
|
|
113
|
-
>
|
|
114
|
-
{layout.width > 0 && ( // Render gradient only when layout is measured will crash otherwise
|
|
115
|
-
<LinearGradient
|
|
116
|
-
style={{ flex: 1 }}
|
|
117
|
-
pointerEvents="none"
|
|
118
|
-
colors={[
|
|
119
|
-
highlightColorWithOpacity,
|
|
120
|
-
highlightColor,
|
|
121
|
-
highlightColorWithOpacity,
|
|
122
|
-
]}
|
|
123
|
-
locations={[0, 0.5, 1]}
|
|
124
|
-
start={{ x: 0, y: 0 }}
|
|
125
|
-
end={{ x: 1, y: 0 }}
|
|
126
|
-
/>
|
|
127
|
-
)}
|
|
128
|
-
</Animated.View>
|
|
129
|
-
</View>
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const styles = StyleSheet.create({
|
|
134
|
-
headingS: {
|
|
135
|
-
height: 24,
|
|
136
|
-
minWidth: 120,
|
|
137
|
-
maxWidth: 240,
|
|
138
|
-
},
|
|
139
|
-
headingM: {
|
|
140
|
-
height: 32,
|
|
141
|
-
minWidth: 120,
|
|
142
|
-
maxWidth: 240,
|
|
143
|
-
},
|
|
144
|
-
headingL: {
|
|
145
|
-
height: 40,
|
|
146
|
-
minWidth: 120,
|
|
147
|
-
maxWidth: 240,
|
|
148
|
-
},
|
|
149
|
-
body: {
|
|
150
|
-
height: 16,
|
|
151
|
-
maxWidth: 300,
|
|
152
|
-
minWidth: 120,
|
|
153
|
-
},
|
|
154
|
-
bodyS: {
|
|
155
|
-
height: 16,
|
|
156
|
-
maxWidth: 180,
|
|
157
|
-
minWidth: 120,
|
|
158
|
-
},
|
|
159
|
-
actionS: {
|
|
160
|
-
height: 40,
|
|
161
|
-
width: 40,
|
|
162
|
-
},
|
|
163
|
-
actionL: {
|
|
164
|
-
height: 48,
|
|
165
|
-
width: 160,
|
|
166
|
-
},
|
|
167
|
-
assetS: {
|
|
168
|
-
height: 40,
|
|
169
|
-
width: 40,
|
|
170
|
-
},
|
|
171
|
-
assetXS: {
|
|
172
|
-
height: 16,
|
|
173
|
-
width: 16,
|
|
174
|
-
},
|
|
175
|
-
assetL: {
|
|
176
|
-
height: 80,
|
|
177
|
-
width: 80,
|
|
178
|
-
},
|
|
179
|
-
panel: {
|
|
180
|
-
height: 200,
|
|
181
|
-
width: 300,
|
|
182
|
-
},
|
|
183
|
-
panelS: {
|
|
184
|
-
height: 133,
|
|
185
|
-
width: 144,
|
|
186
|
-
},
|
|
187
|
-
});
|
package/src/StatusSkeleton.tsx
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { PxSkeleton } from './Skeleton';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useTheme } from '@proximus/lavender-styling-native';
|
|
5
|
-
import { ISkeletonProps } from './types';
|
|
6
|
-
|
|
7
|
-
export function PxStatusSkeleton({ inverted, containerStyle }: ISkeletonProps) {
|
|
8
|
-
const { theme } = useTheme();
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<View
|
|
12
|
-
style={[
|
|
13
|
-
containerStyle,
|
|
14
|
-
{ flexDirection: 'row', gap: theme.t('Spacing2xsMobile').number },
|
|
15
|
-
]}
|
|
16
|
-
>
|
|
17
|
-
<PxSkeleton variant={'assetXS'} inverted={inverted} />
|
|
18
|
-
<PxSkeleton variant={'body'} inverted={inverted} />
|
|
19
|
-
</View>
|
|
20
|
-
);
|
|
21
|
-
}
|
package/src/TileSkeleton.tsx
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { View } from 'react-native';
|
|
2
|
-
import { PxSkeleton } from './Skeleton';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useTheme } from '@proximus/lavender-styling-native';
|
|
5
|
-
import { ISkeletonProps } from './types';
|
|
6
|
-
|
|
7
|
-
function PxTileSkeleton({ inverted }: ISkeletonProps) {
|
|
8
|
-
const { theme } = useTheme();
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<View
|
|
12
|
-
style={{
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
gap: theme.t('SpacingSMobile').number,
|
|
15
|
-
borderBottomEndRadius: theme.t('RadiusMain').number,
|
|
16
|
-
borderBottomStartRadius: theme.t('RadiusMain').number,
|
|
17
|
-
padding: theme.t('PaddingSMobile').number,
|
|
18
|
-
backgroundColor: theme.t('ColorBackgroundSurfaceLight'),
|
|
19
|
-
}}
|
|
20
|
-
>
|
|
21
|
-
<PxSkeleton variant={'assetS'} inverted={inverted} />
|
|
22
|
-
<PxSkeleton variant={'headingS'} inverted={inverted} />
|
|
23
|
-
</View>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function PxTilesSkeleton({ inverted, containerStyle }: ISkeletonProps) {
|
|
28
|
-
const { theme } = useTheme();
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<View
|
|
32
|
-
style={[
|
|
33
|
-
containerStyle,
|
|
34
|
-
{
|
|
35
|
-
gap: theme.t('SpacingSMobile').number,
|
|
36
|
-
flexDirection: 'row',
|
|
37
|
-
overflow: 'hidden',
|
|
38
|
-
},
|
|
39
|
-
]}
|
|
40
|
-
>
|
|
41
|
-
<PxTileSkeleton inverted={inverted} />
|
|
42
|
-
<PxTileSkeleton inverted={inverted} />
|
|
43
|
-
<PxTileSkeleton inverted={inverted} />
|
|
44
|
-
</View>
|
|
45
|
-
);
|
|
46
|
-
}
|
package/src/index.ts
DELETED
package/src/types.ts
DELETED