Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added package for react-native SVG icons #529

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-native-icons/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["@griffel"],
"presets": ["@babel/preset-typescript"],
"compact": false
}
4 changes: 2 additions & 2 deletions packages/react-native-icons/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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\'');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these commented lines be removed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for now. Maybe I'll need it later. If not, I'll remove it

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;
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-native-icons/src/custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'react-native-svg';
declare module 'react-native-svg' {
export interface SvgProps {
xmlns?: string;
}
}
3 changes: 2 additions & 1 deletion packages/react-native-icons/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"skipLibCheck": true,
"outDir": "lib",
"target": "ES6",
"module": "esnext",
Expand All @@ -14,6 +15,6 @@
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
},
"include": ["src"],
"include": ["src", "custom.d.ts"],
"exclude": ["lib", "lib-cjs"]
}