Skip to content

Commit 9d633a3

Browse files
authored
Types import fix (#87)
* fix: correct type imports and reorder IconProps fields for consistency. Closes #86 * fix: standardize import quotes in generate-svg.mjs * chore: release 3.0.4
1 parent fe53c8a commit 9d633a3

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

generator/generate-svg.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const generateMainIconFile = (icon) => {
141141
const component = Case.pascal(icon);
142142
const componentCode = `import { type Icon, type IconProps } from 'phosphor-react-native'
143143
144-
import IconBase from "../lib/icon-base";
144+
import IconBase from '../lib/icon-base'
145145
import weights from '../defs/${component}'
146146
147147
const I: Icon = ({...props }: IconProps) => (

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "phosphor-react-native",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"description": "Flexible icons for React Native",
55
"main": "lib/commonjs/index.js",
66
"module": "lib/module/index.js",

src/lib/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { createContext } from 'react';
2-
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
2+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
33

44
export type IconWeight =
55
| 'thin'
@@ -11,15 +11,15 @@ export type IconWeight =
1111

1212
export interface IconProps {
1313
color?: string;
14+
duotoneColor?: string;
15+
duotoneOpacity?: number;
16+
mirrored?: boolean;
1417
size?: string | number;
15-
weight?: IconWeight;
1618
style?: StyleProp<ViewStyle | TextStyle>;
17-
mirrored?: boolean;
1819
testID?: string;
19-
duotoneColor?: string;
20-
duotoneOpacity?: number;
2120
title?: string; // SVGRProps
2221
titleId?: string; // SVGRProps
22+
weight?: IconWeight;
2323
}
2424

2525
export type Icon = React.FC<IconProps>;

0 commit comments

Comments
 (0)