Skip to content

Commit 01daced

Browse files
authored
Merge pull request #2 from stplasim/master
Fiexed some errors with the package
2 parents bc5518c + 38bce41 commit 01daced

1,321 files changed

Lines changed: 1333 additions & 10 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"@typescript-eslint/member-delimiter-style": "off",
3131
"@typescript-eslint/explicit-function-return-type": "off",
3232
"@typescript-eslint/no-var-requires": "off",
33-
"@typescript-eslint/no-extra-semi": "off"
33+
"@typescript-eslint/no-extra-semi": "off",
34+
"@typescript-eslint/no-explicit-any": "off"
3435
},
3536
"overrides": [
3637
{

generator.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function formatName(string) {
4242
*/
4343
function componentTemplate(name, svg) {
4444
let component = "import React from 'react'\n"
45-
component += "import { IconProps } from './types'\n"
45+
component += "import { IconProps } from './types'\n\n"
4646
component += `const ${name}: React.FC<IconProps> = (props) => (`
4747
component += svg + ')\n\n'
4848
component += `export { ${name} }`
@@ -101,7 +101,10 @@ async function getSVGFile(icon, version) {
101101
`https://fonts.gstatic.com/s/i/materialicons/${icon}/v${version}/24px.svg`
102102
)
103103

104-
return svg.data.replace('height="24"', '').replace('width="24"', '{...props}')
104+
return svg.data
105+
.replace('height="24"', '')
106+
.replace('width="24"', '{...props}')
107+
.replace(/class/g, 'className')
105108
}
106109

107110
/**

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"homepage": "https://github.com/aboutbits/react-material-icons#readme",
4040
"devDependencies": {
4141
"@types/jest": "^26.0.14",
42+
"@types/react": "^16.9.50",
4243
"@typescript-eslint/parser": "^4.3.0",
4344
"@typescript-eslint/eslint-plugin": "^4.3.0",
4445
"react": "^16.13.1",

src/components/Icon360.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { IconProps } from './types'
3+
34
const Icon360: React.FC<IconProps> = (props) => (
45
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
56
<path d="M0 0h24v24H0z" fill="none" />

src/components/Icon3dRotation.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { IconProps } from './types'
3+
34
const Icon3dRotation: React.FC<IconProps> = (props) => (
45
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
56
<path d="M0 0h24v24H0z" fill="none" />

src/components/Icon4k.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { IconProps } from './types'
3+
34
const Icon4k: React.FC<IconProps> = (props) => (
45
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
56
<path d="M0 0h24v24H0V0z" fill="none" />

src/components/Icon5g.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { IconProps } from './types'
3+
34
const Icon5g: React.FC<IconProps> = (props) => (
45
<svg
56
xmlns="http://www.w3.org/2000/svg"

src/components/Icon6FtApart.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { IconProps } from './types'
3+
34
const Icon6FtApart: React.FC<IconProps> = (props) => (
45
<svg
56
xmlns="http://www.w3.org/2000/svg"

src/components/IconAcUnit.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { IconProps } from './types'
3+
34
const IconAcUnit: React.FC<IconProps> = (props) => (
45
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
56
<path d="M0 0h24v24H0z" fill="none" />

src/components/IconAccessAlarm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { IconProps } from './types'
3+
34
const IconAccessAlarm: React.FC<IconProps> = (props) => (
45
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
56
<path d="M0 0h24v24H0z" fill="none" />

0 commit comments

Comments
 (0)