Skip to content

Fiexed some errors with the package - #2

Merged
alexlanz merged 21 commits into
aboutbits:masterfrom
stplasim:master
Oct 6, 2020
Merged

Fiexed some errors with the package#2
alexlanz merged 21 commits into
aboutbits:masterfrom
stplasim:master

Conversation

@stplasim

@stplasim stplasim commented Oct 5, 2020

Copy link
Copy Markdown
Contributor
  • Fixed import errors
  • Fixed typescript compilation error
  • Fixed linting errors

Comment thread generator.js Outdated
let component = "import React from 'react'\n"
component += "import { IconProps } from './types'\n"
component += `const ${name}: React.FC<IconProps> = (props) => (`
component += `const ${name}: React.FC<IconProps> = (props: IconProps):any => (`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are you sure that this is required? @mmalfertheiner do we need here a return value?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Simon, React.FC is an interface, which defines the parameters and the return value. Thats why the original version was correct.

Comment thread src/components/Icon360.tsx Outdated
@@ -0,0 +1,10 @@
import React from 'react'
import { IconProps } from './types'
const Icon360: React.FC<IconProps> = (props: IconProps): any => (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we add an additonal empty line between the imports and the component declaration?

Comment thread package.json Outdated
"ts-jest": "^26.4.1",
"typescript": "^4.0.3"
"typescript": "^4.0.3",
"react": "^16.13.1",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is react and react-com here included twice?

@alexlanz
alexlanz merged commit 01daced into aboutbits:master Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants