diff --git a/packages/react-native-icons/.babelrc b/packages/react-native-icons/.babelrc index ef11e7c534..a02540ef7f 100644 --- a/packages/react-native-icons/.babelrc +++ b/packages/react-native-icons/.babelrc @@ -1,4 +1,4 @@ { - "presets": ["@griffel"], + "presets": ["@babel/preset-typescript"], "compact": false } diff --git a/packages/react-native-icons/convert.js b/packages/react-native-icons/convert.js index e53a2b6ba7..1704d72e79 100644 --- a/packages/react-native-icons/convert.js +++ b/packages/react-native-icons/convert.js @@ -69,9 +69,9 @@ function processFiles(src, dest) { // Finally add the interface definition and then write out the index. indexContents.push('export { FluentReactNativeIconsProps } from \'./utils/FluentReactNativeIconsProps.types\''); indexContents.push('export { default as wrapIcon } from \'./utils/wrapIcon\''); - indexContents.push('export { default as bundleIcon } from \'./utils/bundleIcon\''); + //indexContents.push('export { default as bundleIcon } from \'./utils/bundleIcon\''); indexContents.push('export * from \'./utils/useIconState\''); - indexContents.push('export * from \'./utils/constants\''); + //indexContents.push('export * from \'./utils/constants\''); fs.writeFileSync(indexPath, indexContents.join('\n'), (err) => { if (err) throw err; diff --git a/packages/react-native-icons/package.json b/packages/react-native-icons/package.json index 1f465c879b..05beb3bfd2 100644 --- a/packages/react-native-icons/package.json +++ b/packages/react-native-icons/package.json @@ -46,7 +46,8 @@ "tslib": "^2.1.0" }, "peerDependencies": { - "react": ">=16.8.0 <19.0.0" + "react": ">=16.8.0 <19.0.0", + "react-native": "^0.68.0" }, "files": [ "lib/", diff --git a/packages/react-native-icons/src/custom.d.ts b/packages/react-native-icons/src/custom.d.ts new file mode 100644 index 0000000000..a3da4a991d --- /dev/null +++ b/packages/react-native-icons/src/custom.d.ts @@ -0,0 +1,6 @@ +import 'react-native-svg'; +declare module 'react-native-svg' { + export interface SvgProps { + xmlns?: string; + } +} \ No newline at end of file diff --git a/packages/react-native-icons/tsconfig.json b/packages/react-native-icons/tsconfig.json index 5d8e2cdff6..1080c7211b 100644 --- a/packages/react-native-icons/tsconfig.json +++ b/packages/react-native-icons/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "skipLibCheck": true, "outDir": "lib", "target": "ES6", "module": "esnext", @@ -14,6 +15,6 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true }, - "include": ["src"], + "include": ["src", "custom.d.ts"], "exclude": ["lib", "lib-cjs"] } \ No newline at end of file