@fluentui-react-native/experimental-activity-indicator 0.3.26 → 0.5.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.
- package/CHANGELOG.json +113 -1
- package/CHANGELOG.md +39 -2
- package/lib/ActivityIndicator.android.d.ts +4 -0
- package/lib/ActivityIndicator.android.d.ts.map +1 -0
- package/lib/ActivityIndicator.android.js +4 -0
- package/lib/ActivityIndicator.android.js.map +1 -0
- package/lib/ActivityIndicator.d.ts +3 -5
- package/lib/ActivityIndicator.d.ts.map +1 -1
- package/lib/ActivityIndicator.ios.d.ts +4 -0
- package/lib/ActivityIndicator.ios.d.ts.map +1 -0
- package/lib/ActivityIndicator.ios.js +4 -0
- package/lib/ActivityIndicator.ios.js.map +1 -0
- package/lib/ActivityIndicator.js +3 -90
- package/lib/ActivityIndicator.js.map +1 -1
- package/lib/ActivityIndicator.mobile.d.ts +6 -0
- package/lib/ActivityIndicator.mobile.d.ts.map +1 -0
- package/lib/ActivityIndicator.mobile.js +117 -0
- package/lib/ActivityIndicator.mobile.js.map +1 -0
- package/lib/ActivityIndicator.styling.d.ts +5 -2
- package/lib/ActivityIndicator.styling.d.ts.map +1 -1
- package/lib/ActivityIndicator.styling.js +45 -0
- package/lib/ActivityIndicator.styling.js.map +1 -1
- package/lib/ActivityIndicator.types.d.ts +17 -9
- package/lib/ActivityIndicator.types.d.ts.map +1 -1
- package/lib/CoreActivityIndicator.d.ts +8 -0
- package/lib/CoreActivityIndicator.d.ts.map +1 -0
- package/lib/CoreActivityIndicator.js +27 -0
- package/lib/CoreActivityIndicator.js.map +1 -0
- package/lib-commonjs/ActivityIndicator.android.d.ts +4 -0
- package/lib-commonjs/ActivityIndicator.android.d.ts.map +1 -0
- package/lib-commonjs/ActivityIndicator.android.js +7 -0
- package/lib-commonjs/ActivityIndicator.android.js.map +1 -0
- package/lib-commonjs/ActivityIndicator.d.ts +3 -5
- package/lib-commonjs/ActivityIndicator.d.ts.map +1 -1
- package/lib-commonjs/ActivityIndicator.ios.d.ts +4 -0
- package/lib-commonjs/ActivityIndicator.ios.d.ts.map +1 -0
- package/lib-commonjs/ActivityIndicator.ios.js +7 -0
- package/lib-commonjs/ActivityIndicator.ios.js.map +1 -0
- package/lib-commonjs/ActivityIndicator.js +4 -90
- package/lib-commonjs/ActivityIndicator.js.map +1 -1
- package/lib-commonjs/ActivityIndicator.mobile.d.ts +6 -0
- package/lib-commonjs/ActivityIndicator.mobile.d.ts.map +1 -0
- package/lib-commonjs/ActivityIndicator.mobile.js +119 -0
- package/lib-commonjs/ActivityIndicator.mobile.js.map +1 -0
- package/lib-commonjs/ActivityIndicator.styling.d.ts +5 -2
- package/lib-commonjs/ActivityIndicator.styling.d.ts.map +1 -1
- package/lib-commonjs/ActivityIndicator.styling.js +49 -0
- package/lib-commonjs/ActivityIndicator.styling.js.map +1 -1
- package/lib-commonjs/ActivityIndicator.types.d.ts +17 -9
- package/lib-commonjs/ActivityIndicator.types.d.ts.map +1 -1
- package/lib-commonjs/CoreActivityIndicator.d.ts +8 -0
- package/lib-commonjs/CoreActivityIndicator.d.ts.map +1 -0
- package/lib-commonjs/CoreActivityIndicator.js +29 -0
- package/lib-commonjs/CoreActivityIndicator.js.map +1 -0
- package/package.json +8 -7
- package/src/ActivityIndicator.android.tsx +3 -0
- package/src/ActivityIndicator.ios.tsx +3 -0
- package/src/ActivityIndicator.mobile.tsx +119 -0
- package/src/ActivityIndicator.styling.tsx +48 -3
- package/src/ActivityIndicator.tsx +3 -89
- package/src/ActivityIndicator.types.tsx +19 -10
- package/src/CoreActivityIndicator.tsx +22 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/** @jsx withSlots */
|
|
2
|
+
import { useRef, useEffect, useCallback } from 'react';
|
|
3
|
+
import { Animated, Easing, View } from 'react-native';
|
|
4
|
+
import { Svg, Path } from 'react-native-svg';
|
|
5
|
+
import { compose, mergeProps, withSlots, UseSlots, buildUseStyling } from '@fluentui-react-native/framework';
|
|
6
|
+
import { activityIndicatorName, ActivityIndicatorProps, FluentActivityIndicatorType } from './ActivityIndicator.types';
|
|
7
|
+
import { diameterSizeMap, lineThicknessSizeMap, stylingSettings } from './ActivityIndicator.styling';
|
|
8
|
+
|
|
9
|
+
const getActivityIndicatorPath = (diameter: number, width: number, color: string) => {
|
|
10
|
+
const start = {
|
|
11
|
+
x: width / 2,
|
|
12
|
+
y: diameter / 2,
|
|
13
|
+
};
|
|
14
|
+
const innerRadius = diameter / 2 - width / 2;
|
|
15
|
+
const path = `M${start.x} ${start.y} a${innerRadius} ${innerRadius} 0 1 1 ${innerRadius} ${innerRadius}`;
|
|
16
|
+
|
|
17
|
+
return <Path d={path} stroke={color} strokeWidth={width} strokeLinecap="round" />;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const AnimatedSvg = Animated.createAnimatedComponent(Svg);
|
|
21
|
+
const useStyling = buildUseStyling(stylingSettings);
|
|
22
|
+
export const ActivityIndicator = compose<FluentActivityIndicatorType>({
|
|
23
|
+
displayName: activityIndicatorName,
|
|
24
|
+
...stylingSettings,
|
|
25
|
+
slots: {
|
|
26
|
+
root: View,
|
|
27
|
+
svg: AnimatedSvg,
|
|
28
|
+
},
|
|
29
|
+
render: (props: ActivityIndicatorProps, useSlots: UseSlots<FluentActivityIndicatorType>) => {
|
|
30
|
+
const Slots = useSlots(props);
|
|
31
|
+
const slotProps = useStyling(props);
|
|
32
|
+
|
|
33
|
+
const animating = props.animating != undefined ? props.animating : true;
|
|
34
|
+
const hidesWhenStopped = props.hidesWhenStopped != undefined ? props.hidesWhenStopped : true;
|
|
35
|
+
// React Native ActivityIndicator still takes up space when hidden, so to perfectly match would use opacity
|
|
36
|
+
// hiding opacity makes the screen reader on iOS and Android skip over it
|
|
37
|
+
const hideOpacity = animating == false && hidesWhenStopped == true ? 0 : 1;
|
|
38
|
+
|
|
39
|
+
const rotationAngle = useRef(new Animated.Value(0)).current;
|
|
40
|
+
|
|
41
|
+
const rotationAnimation = useRef<Animated.CompositeAnimation | undefined>(undefined);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* https://github.com/facebook/react-native/pull/29585
|
|
45
|
+
* For Animated.loop() to work with the native driver, React Native needs this fix.
|
|
46
|
+
* It's only available in React Native 0.66+, and React Native macOS 0.62+
|
|
47
|
+
* To workaround this, let's just rerun the loop everytime the animation finishes
|
|
48
|
+
*/
|
|
49
|
+
const startRotation = useCallback(() => {
|
|
50
|
+
if (rotationAnimation.current) {
|
|
51
|
+
rotationAngle.setValue(0);
|
|
52
|
+
rotationAnimation.current.reset();
|
|
53
|
+
rotationAnimation.current.start((result: Animated.EndResult) => {
|
|
54
|
+
if (result.finished) {
|
|
55
|
+
startRotation();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}, [rotationAngle, animating]);
|
|
60
|
+
|
|
61
|
+
const stopRotation = () => {
|
|
62
|
+
if (rotationAnimation.current) {
|
|
63
|
+
rotationAnimation.current.stop();
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (rotationAnimation.current === undefined) {
|
|
69
|
+
rotationAnimation.current = Animated.sequence([
|
|
70
|
+
Animated.timing(rotationAngle, {
|
|
71
|
+
toValue: 359,
|
|
72
|
+
duration: 750,
|
|
73
|
+
useNativeDriver: true,
|
|
74
|
+
easing: Easing.linear,
|
|
75
|
+
}),
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (animating) {
|
|
80
|
+
startRotation();
|
|
81
|
+
} else {
|
|
82
|
+
stopRotation();
|
|
83
|
+
}
|
|
84
|
+
}, [animating, hidesWhenStopped, rotationAngle]);
|
|
85
|
+
|
|
86
|
+
const interpolateSpin = rotationAngle.interpolate({
|
|
87
|
+
inputRange: [0, 359],
|
|
88
|
+
outputRange: ['0deg', '359deg'],
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const path = getActivityIndicatorPath(
|
|
92
|
+
diameterSizeMap[slotProps.root.size],
|
|
93
|
+
lineThicknessSizeMap[slotProps.root.lineThickness],
|
|
94
|
+
slotProps.root.activityIndicatorColor,
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
// perspective is needed for animations to work on Android. See https://reactnative.dev/docs/animations#bear-in-mind
|
|
98
|
+
const animatedSvgProps = {
|
|
99
|
+
style: {
|
|
100
|
+
transform: [{ rotateZ: interpolateSpin }, { perspective: 10 }],
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const otherRootProps = {
|
|
105
|
+
style: {
|
|
106
|
+
opacity: hideOpacity,
|
|
107
|
+
},
|
|
108
|
+
accessibilityState: { busy: animating },
|
|
109
|
+
};
|
|
110
|
+
return (rest: ActivityIndicatorProps) => {
|
|
111
|
+
const { ...mergedProps } = mergeProps(props, rest, otherRootProps);
|
|
112
|
+
return (
|
|
113
|
+
<Slots.root {...mergedProps}>
|
|
114
|
+
<Slots.svg {...animatedSvgProps}>{path}</Slots.svg>
|
|
115
|
+
</Slots.root>
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
});
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { UseStylingOptions, buildProps } from '@fluentui-react-native/framework';
|
|
2
|
-
import { Appearance } from 'react-native';
|
|
2
|
+
import { ActivityIndicatorProps as CoreActivityIndicatorProps, Appearance } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
activityIndicatorName,
|
|
5
5
|
ActivityIndicatorProps,
|
|
6
|
-
|
|
6
|
+
FluentActivityIndicatorSlotProps,
|
|
7
7
|
ActivityIndicatorTokens,
|
|
8
|
+
CoreActivityIndicatorSlotProps,
|
|
9
|
+
ActivityIndicatorSize,
|
|
8
10
|
} from './ActivityIndicator.types';
|
|
11
|
+
import assertNever from 'assert-never';
|
|
9
12
|
|
|
10
13
|
export const diameterSizeMap: { [key: string]: number } = {
|
|
11
14
|
xSmall: 12,
|
|
@@ -22,7 +25,29 @@ export const lineThicknessSizeMap: { [key: string]: number } = {
|
|
|
22
25
|
xLarge: 4,
|
|
23
26
|
};
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
// Size coversion ramp from the Fluent ActivityIndicator size to the RN ActivityIndicator.
|
|
29
|
+
export function coreSizeFromFluentSize(fluentSize: ActivityIndicatorSize): CoreActivityIndicatorProps['size'] {
|
|
30
|
+
if (typeof fluentSize === 'undefined') {
|
|
31
|
+
return fluentSize;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
switch (fluentSize) {
|
|
35
|
+
case 'xSmall':
|
|
36
|
+
return 'small';
|
|
37
|
+
case 'small':
|
|
38
|
+
return 'small';
|
|
39
|
+
case 'medium':
|
|
40
|
+
return 'small';
|
|
41
|
+
case 'large':
|
|
42
|
+
return 'large';
|
|
43
|
+
case 'xLarge':
|
|
44
|
+
return 'large';
|
|
45
|
+
default:
|
|
46
|
+
assertNever(fluentSize);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const stylingSettings: UseStylingOptions<ActivityIndicatorProps, FluentActivityIndicatorSlotProps, ActivityIndicatorTokens> = {
|
|
26
51
|
tokens: [
|
|
27
52
|
() => ({
|
|
28
53
|
activityIndicatorColor: Appearance.getColorScheme() === 'light' ? '#BDBDBD' : '#666666',
|
|
@@ -56,3 +81,23 @@ export const stylingSettings: UseStylingOptions<ActivityIndicatorProps, Activity
|
|
|
56
81
|
),
|
|
57
82
|
},
|
|
58
83
|
};
|
|
84
|
+
|
|
85
|
+
// Minimal styling settings for the RN Core ActivityIndicator
|
|
86
|
+
export const coreStylingSettings: UseStylingOptions<ActivityIndicatorProps, CoreActivityIndicatorSlotProps, ActivityIndicatorTokens> = {
|
|
87
|
+
tokens: [
|
|
88
|
+
() => ({
|
|
89
|
+
size: 'small',
|
|
90
|
+
}),
|
|
91
|
+
activityIndicatorName,
|
|
92
|
+
],
|
|
93
|
+
tokensThatAreAlsoProps: 'all',
|
|
94
|
+
slotProps: {
|
|
95
|
+
root: buildProps(
|
|
96
|
+
(tokens: ActivityIndicatorTokens) => ({
|
|
97
|
+
color: tokens.activityIndicatorColor,
|
|
98
|
+
...(tokens.size && { size: coreSizeFromFluentSize(tokens.size) }), // Only pass in the prop if defined
|
|
99
|
+
}),
|
|
100
|
+
['activityIndicatorColor', 'size'],
|
|
101
|
+
),
|
|
102
|
+
},
|
|
103
|
+
};
|
|
@@ -1,89 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { Svg, Path } from 'react-native-svg';
|
|
5
|
-
import { compose, mergeProps, withSlots, UseSlots, buildUseStyling } from '@fluentui-react-native/framework';
|
|
6
|
-
import { activityIndicatorName, ActivityIndicatorProps, ActivityIndicatorType } from './ActivityIndicator.types';
|
|
7
|
-
import { diameterSizeMap, lineThicknessSizeMap, stylingSettings } from './ActivityIndicator.styling';
|
|
8
|
-
|
|
9
|
-
const getActivityIndicatorPath = (diameter: number, width: number, color: string) => {
|
|
10
|
-
const start = {
|
|
11
|
-
x: width / 2,
|
|
12
|
-
y: diameter / 2,
|
|
13
|
-
};
|
|
14
|
-
const innerRadius = diameter / 2 - width / 2;
|
|
15
|
-
const path = `M${start.x} ${start.y} a${innerRadius} ${innerRadius} 0 1 1 ${innerRadius} ${innerRadius}`;
|
|
16
|
-
|
|
17
|
-
return <Path d={path} stroke={color} strokeWidth={width} strokeLinecap="round" />;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const AnimatedSvg = Animated.createAnimatedComponent(Svg);
|
|
21
|
-
const useStyling = buildUseStyling(stylingSettings);
|
|
22
|
-
export const ActivityIndicator = compose<ActivityIndicatorType>({
|
|
23
|
-
displayName: activityIndicatorName,
|
|
24
|
-
...stylingSettings,
|
|
25
|
-
slots: {
|
|
26
|
-
root: View,
|
|
27
|
-
svg: AnimatedSvg,
|
|
28
|
-
},
|
|
29
|
-
render: (props: ActivityIndicatorProps, useSlots: UseSlots<ActivityIndicatorType>) => {
|
|
30
|
-
const Slots = useSlots(props);
|
|
31
|
-
const slotProps = useStyling(props);
|
|
32
|
-
|
|
33
|
-
const animating = props.animating != undefined ? props.animating : true;
|
|
34
|
-
const hidesWhenStopped = props.hidesWhenStopped != undefined ? props.hidesWhenStopped : true;
|
|
35
|
-
// React Native ActivityIndicator still takes up space when hidden, so to perfectly match would use opacity
|
|
36
|
-
// hiding opacity makes the screen reader on iOS and Android skip over it
|
|
37
|
-
const hideOpacity = animating == false && hidesWhenStopped == true ? 0 : 1;
|
|
38
|
-
|
|
39
|
-
const spinAnimation = useRef(new Animated.Value(0)).current;
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
if (animating) {
|
|
42
|
-
Animated.loop(
|
|
43
|
-
Animated.sequence([
|
|
44
|
-
Animated.timing(spinAnimation, {
|
|
45
|
-
toValue: 359,
|
|
46
|
-
duration: 750,
|
|
47
|
-
useNativeDriver: false,
|
|
48
|
-
easing: Easing.linear,
|
|
49
|
-
}),
|
|
50
|
-
]),
|
|
51
|
-
).start();
|
|
52
|
-
} else {
|
|
53
|
-
spinAnimation.stopAnimation();
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const interpolateSpin = spinAnimation.interpolate({
|
|
57
|
-
inputRange: [0, 359],
|
|
58
|
-
outputRange: ['0deg', '359deg'],
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const path = getActivityIndicatorPath(
|
|
62
|
-
diameterSizeMap[slotProps.root.size],
|
|
63
|
-
lineThicknessSizeMap[slotProps.root.lineThickness],
|
|
64
|
-
slotProps.root.activityIndicatorColor,
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
// perspective is needed for animations to work on Android. See https://reactnative.dev/docs/animations#bear-in-mind
|
|
68
|
-
const animatedSvgProps = {
|
|
69
|
-
style: {
|
|
70
|
-
transform: [{ rotateZ: interpolateSpin }, { perspective: 10 }],
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
const otherRootProps = {
|
|
75
|
-
style: {
|
|
76
|
-
opacity: hideOpacity,
|
|
77
|
-
},
|
|
78
|
-
accessibilityState: { busy: animating },
|
|
79
|
-
};
|
|
80
|
-
return (rest: ActivityIndicatorProps) => {
|
|
81
|
-
const { ...mergedProps } = mergeProps(props, rest, otherRootProps);
|
|
82
|
-
return (
|
|
83
|
-
<Slots.root {...mergedProps}>
|
|
84
|
-
<Slots.svg {...animatedSvgProps}>{path}</Slots.svg>
|
|
85
|
-
</Slots.root>
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
},
|
|
89
|
-
});
|
|
1
|
+
import { ActivityIndicator } from './CoreActivityIndicator';
|
|
2
|
+
export { ActivityIndicator } from './CoreActivityIndicator';
|
|
3
|
+
export default ActivityIndicator;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Animated,
|
|
1
|
+
import { Animated, ActivityIndicatorProps as CoreActivityIndicatorProps } from 'react-native';
|
|
2
2
|
import { SvgProps } from 'react-native-svg';
|
|
3
3
|
|
|
4
4
|
export const activityIndicatorName = 'ActivityIndicator';
|
|
5
5
|
/**
|
|
6
|
-
* Specifies the possible sizes of the ActivityIndicator
|
|
6
|
+
* Specifies the possible sizes of the ActivityIndicator.
|
|
7
7
|
*/
|
|
8
8
|
export type ActivityIndicatorSize = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge';
|
|
9
9
|
|
|
@@ -25,12 +25,7 @@ export interface ActivityIndicatorTokens {
|
|
|
25
25
|
size?: ActivityIndicatorSize;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export interface
|
|
29
|
-
root: ViewProps & ActivityIndicatorTokens;
|
|
30
|
-
svg: Animated.AnimatedProps<SvgProps>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface ActivityIndicatorProps extends ActivityIndicatorTokens, ViewProps {
|
|
28
|
+
export interface ActivityIndicatorProps extends ActivityIndicatorTokens, Omit<CoreActivityIndicatorProps, 'size'> {
|
|
34
29
|
/**
|
|
35
30
|
* ActivityIndicator animating or not
|
|
36
31
|
* @defaultValue 'true'
|
|
@@ -43,8 +38,22 @@ export interface ActivityIndicatorProps extends ActivityIndicatorTokens, ViewPro
|
|
|
43
38
|
hidesWhenStopped?: boolean;
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
export interface
|
|
41
|
+
export interface FluentActivityIndicatorSlotProps {
|
|
42
|
+
root: ActivityIndicatorProps;
|
|
43
|
+
svg: Animated.AnimatedProps<SvgProps>;
|
|
44
|
+
}
|
|
45
|
+
export interface FluentActivityIndicatorType {
|
|
46
|
+
props: ActivityIndicatorProps;
|
|
47
|
+
slotProps: FluentActivityIndicatorSlotProps;
|
|
48
|
+
tokens: ActivityIndicatorTokens;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface CoreActivityIndicatorSlotProps {
|
|
52
|
+
root: CoreActivityIndicatorProps;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface CoreActivityIndicatorType {
|
|
47
56
|
props: ActivityIndicatorProps;
|
|
48
|
-
slotProps:
|
|
57
|
+
slotProps: CoreActivityIndicatorSlotProps;
|
|
49
58
|
tokens: ActivityIndicatorTokens;
|
|
50
59
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @jsx withSlots */
|
|
2
|
+
|
|
3
|
+
import { ActivityIndicator as CoreActivityIndicator } from 'react-native';
|
|
4
|
+
import { activityIndicatorName, CoreActivityIndicatorType, ActivityIndicatorProps } from './ActivityIndicator.types';
|
|
5
|
+
import { coreStylingSettings } from './ActivityIndicator.styling';
|
|
6
|
+
import { compose, withSlots, UseSlots } from '@fluentui-react-native/framework';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Wrapper around React Native Core's ActivityIndicator for platforms we do not
|
|
10
|
+
* have a custom FluentUI React Native ActivityIndicator defined.
|
|
11
|
+
*/
|
|
12
|
+
export const ActivityIndicator = compose<CoreActivityIndicatorType>({
|
|
13
|
+
displayName: activityIndicatorName,
|
|
14
|
+
...coreStylingSettings,
|
|
15
|
+
slots: {
|
|
16
|
+
root: CoreActivityIndicator,
|
|
17
|
+
},
|
|
18
|
+
render: (props: ActivityIndicatorProps, useSlots: UseSlots<CoreActivityIndicatorType>) => {
|
|
19
|
+
const Slots = useSlots(props);
|
|
20
|
+
return () => <Slots.root />;
|
|
21
|
+
},
|
|
22
|
+
});
|