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

Add children to all component interfaces where the prop is used #170

Open
ls-andrew-borstein opened this issue Oct 12, 2022 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@ls-andrew-borstein
Copy link
Contributor

ls-andrew-borstein commented Oct 12, 2022

Description

While attempting to import the <Dropdown> component from Flame in the new insights app, we ran into a Typescript issue where the app wouldn't compile because children is not a valid prop in the Dropdown interface.

The insights app is using React 18 and in that version React.FC no longer includes children by default.

So any Flame components that

  • use React.FC
  • include a children prop
  • don't type their props to include children or extend a type that does so (e.g. Box)

will probably need to be updated to be compatible with React 18 and TS.

Requirements

Dependencies

<Dropdown> and other similar components that take children can be successfully used in a React 18 / Typescript project, like lighthouse-insights.

Required before signoff

n/a

Design/Examples

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant