Skip to content

Commit 7fb7107

Browse files
committed
Fix exports/imports to use type prefix
1 parent 12cb564 commit 7fb7107

File tree

4 files changed

+27
-21
lines changed

4 files changed

+27
-21
lines changed

packages/core/src/components/MediaPlayer/AudioPlayer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from "./AudioPlayerCommon";
77
import HeadlessAudioPlayer from "./HeadlessAudioPlayer";
88
import AudioPlayerWithInterface from "./AudioPlayerWithInterface";
9-
import { MediaPlayerRef } from "../MediaPlayerCommon";
9+
import type { MediaPlayerRef } from "../MediaPlayerCommon";
1010

1111
interface AudioPlayerProps {
1212
mode?: "interface" | "headless";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export { default as default } from "./VideoPlayer";
2-
export { VideoPlayerRef } from "./VideoPlayer";
2+
export type { VideoPlayerRef } from "./VideoPlayer";
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import * as React from "react";
2+
import { View, StyleProp, ImageStyle } from "react-native";
3+
import { SvgUri } from "react-native-svg";
4+
5+
import Config from "./Config";
6+
7+
type SVGComponentProps = {
8+
source: string;
9+
style?: StyleProp<ImageStyle>;
10+
};
11+
12+
const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({
13+
source = Config.placeholderSvgURL,
14+
style,
15+
}) => {
16+
return (
17+
<View style={style}>
18+
<SvgUri width="100%" height="100%" uri={source} />
19+
</View>
20+
);
21+
};
22+
23+
export default SVG;
Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from "react";
2-
import { View, Platform, Image, StyleProp, ImageStyle } from "react-native";
3-
import { SvgUri } from "react-native-svg";
2+
import { Image, StyleProp, ImageStyle } from "react-native";
43

54
import Config from "./Config";
65

@@ -13,23 +12,7 @@ const SVG: React.FC<React.PropsWithChildren<SVGComponentProps>> = ({
1312
source = Config.placeholderSvgURL,
1413
style,
1514
}) => {
16-
return (
17-
<>
18-
{Platform.OS === "ios" && (
19-
<View style={style}>
20-
<SvgUri width="100%" height="100%" uri={source} />
21-
</View>
22-
)}
23-
{Platform.OS === "android" && (
24-
<View style={style}>
25-
<SvgUri width="100%" height="100%" uri={source} />
26-
</View>
27-
)}
28-
{Platform.OS === "web" && (
29-
<Image style={style} source={{ uri: source }} />
30-
)}
31-
</>
32-
);
15+
return <Image style={style} source={{ uri: source }} />;
3316
};
3417

3518
export default SVG;

0 commit comments

Comments
 (0)