Skip to content

Commit 30f0e10

Browse files
committed
fix(minor): update ReactStyle type and export it
1 parent 2200989 commit 30f0e10

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import CodeHighlighter, {
22
type CodeHighlighterProps,
33
} from "./lib/CodeHighlighter";
4+
import type { ReactStyle } from "./utils/styles";
45

5-
export type { CodeHighlighterProps };
6+
export type { CodeHighlighterProps, ReactStyle };
67

78
export default CodeHighlighter;

src/utils/styles.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import type { CSSProperties } from "react";
33
import type { TextStyle } from "react-native";
44

55
export type HighlighterStyleSheet = { [key: string]: TextStyle };
6-
export type ReactStyle = Record<string, CSSProperties>;
6+
export type ReactStyle = {
7+
[key: string]: React.CSSProperties;
8+
};
79

810
const ALLOWED_STYLE_PROPERTIES: Record<string, boolean> = {
911
color: true,

0 commit comments

Comments
 (0)