Skip to content

[labs/react] Fix style attribute conflicts with the type definition of DOM and ReactModule - #3048

Closed
indigostar-kr wants to merge 2 commits into
lit:mainfrom
indigostar-kr:feature/fix-react-style
Closed

indigostar-kr wants to merge 2 commits into
lit:mainfrom
indigostar-kr:feature/fix-react-style

Conversation

@indigostar-kr

Copy link
Copy Markdown
'{ children: string; "data-testid": string; appearance: any; }' 형식은 'Partial<EventProps<Events>>' 형식에 할당할 수 없습니다.
  'children' 속성이 인덱스 시그니처와 호환되지 않습니다.
    'string' 형식은 '(e: Event) => void' 형식에 할당할 수 없습니다.ts(2322)

@changeset-bot

changeset-bot Bot commented Jun 16, 2022 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e20b798

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@indigostar-kr indigostar-kr changed the title fix(lit-labs/react): Fix style attribute conflicts with the type defi… [@labs/react] Fix style attribute conflicts with the type definition of DOM and ReactModule Jun 16, 2022
@indigostar-kr
indigostar-kr marked this pull request as ready for review June 16, 2022 06:08
@justinfagnani justinfagnani changed the title [@labs/react] Fix style attribute conflicts with the type definition of DOM and ReactModule [labs/react] Fix style attribute conflicts with the type definition of DOM and ReactModule Jun 16, 2022
@justinfagnani
justinfagnani requested a review from sorvell June 16, 2022 22:29

@justinfagnani justinfagnani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @indigostar-kr !

We'll need some tests here that show we get a build error without the fix. Can you make a test that contains JSX with a style binding? We have one in the tests already with a cast to any, so hopefully that can be removed.

type UserProps = React.PropsWithChildren<
React.PropsWithRef<
Partial<Omit<I, 'children'>> &
Partial<Omit<I, 'children' | 'style' | 'ref' | 'key'>> &

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need to add className here too?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It seems that both class and className should be included.

@indigostar-kr

Copy link
Copy Markdown
Author

Thanks @indigostar-kr !

We'll need some tests here that show we get a build error without the fix. Can you make a test that contains JSX with a style binding? We have one in the tests already with a cast to any, so hopefully that can be removed.

I'll check the test code and see if I can write it.

@taylor-vann

Copy link
Copy Markdown
Contributor

This PR might be resolved with #3072

:) curious if that can be confirmed

@taylor-vann

Copy link
Copy Markdown
Contributor

resolved with #3072

@taylor-vann taylor-vann reopened this Aug 25, 2022
@taylor-vann

Copy link
Copy Markdown
Contributor

oops thought this was an issue my bad, reopened

@taylor-vann

Copy link
Copy Markdown
Contributor

closing as resolved by #3128 and #3163

@indigostar-kr
indigostar-kr deleted the feature/fix-react-style branch November 15, 2022 22:57
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.

[labs/react] createComponent React component style property typescript problem

3 participants