Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-extra-semi": "off"
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-explicit-any": "off"
},
"overrides": [
{
Expand Down
7 changes: 5 additions & 2 deletions generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function formatName(string) {
*/
function componentTemplate(name, svg) {
let component = "import React from 'react'\n"
component += "import { IconProps } from './types'\n"
component += "import { IconProps } from './types'\n\n"
component += `const ${name}: React.FC<IconProps> = (props) => (`
component += svg + ')\n\n'
component += `export { ${name} }`
Expand Down Expand Up @@ -101,7 +101,10 @@ async function getSVGFile(icon, version) {
`https://fonts.gstatic.com/s/i/materialicons/${icon}/v${version}/24px.svg`
)

return svg.data.replace('height="24"', '').replace('width="24"', '{...props}')
return svg.data
.replace('height="24"', '')
.replace('width="24"', '{...props}')
.replace(/class/g, 'className')
}

/**
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"homepage": "https://github.com/aboutbits/react-material-icons#readme",
"devDependencies": {
"@types/jest": "^26.0.14",
"@types/react": "^16.9.50",
"@typescript-eslint/parser": "^4.3.0",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"react": "^16.13.1",
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon360.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const Icon360: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon3dRotation.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const Icon3dRotation: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon4k.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const Icon4k: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0V0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon5g.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const Icon5g: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/Icon6FtApart.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const Icon6FtApart: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAcUnit.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAcUnit: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccessAlarm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccessAlarm: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccessAlarms.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccessAlarms: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M-618-568H782v3600H-618zM0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccessTime.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccessTime: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccessibility.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccessibility: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccessibilityNew.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccessibilityNew: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccessible.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccessible: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccessibleForward.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccessibleForward: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccountBalance.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccountBalance: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccountBalanceWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccountBalanceWallet: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccountBox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccountBox: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccountCircle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccountCircle: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAccountTree.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAccountTree: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAdUnits.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAdUnits: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAdb.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAdb: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAdd.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAdd: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddAPhoto.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddAPhoto: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddAlarm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddAlarm: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddAlert.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddAlert: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0V0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddBox.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddBox: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddBusiness.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddBusiness: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddCircle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddCircle: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddCircleOutline.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddCircleOutline: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddComment.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddComment: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0V0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddIcCall.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddIcCall: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddLocation.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddLocation: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0V0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddLocationAlt.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddLocationAlt: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddPhotoAlternate.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddPhotoAlternate: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddRoad.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddRoad: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddShoppingCart.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddShoppingCart: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0zm18.31 6l-2.76 5z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddTask.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddTask: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddToHomeScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddToHomeScreen: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0V0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddToPhotos.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddToPhotos: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddToQueue.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddToQueue: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0V0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAddchart.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAddchart: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAdjust.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAdjust: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAdminPanelSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAdminPanelSettings: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAgriculture.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAgriculture: React.FC<IconProps> = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAirlineSeatFlat.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAirlineSeatFlat: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAirlineSeatFlatAngled.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAirlineSeatFlatAngled: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAirlineSeatIndividualSuite.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAirlineSeatIndividualSuite: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0V0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAirlineSeatLegroomExtra.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAirlineSeatLegroomExtra: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAirlineSeatLegroomNormal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAirlineSeatLegroomNormal: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAirlineSeatLegroomReduced.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAirlineSeatLegroomReduced: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAirlineSeatReclineExtra.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAirlineSeatReclineExtra: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
1 change: 1 addition & 0 deletions src/components/IconAirlineSeatReclineNormal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { IconProps } from './types'

const IconAirlineSeatReclineNormal: React.FC<IconProps> = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path d="M0 0h24v24H0z" fill="none" />
Expand Down
Loading