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

FAB icon prop should not be required #3594

Closed
hbriese opened this issue Jan 12, 2023 · 1 comment
Closed

FAB icon prop should not be required #3594

hbriese opened this issue Jan 12, 2023 · 1 comment

Comments

@hbriese
Copy link
Contributor

hbriese commented Jan 12, 2023

Current behaviour

icon is a required prop for FAB.

Not passing in the icon prop results in a type error, but the correct behavior

Expected behaviour

A MD3 extended FAB is not required to provide an icon.

At least a icon or a label should be required

How to reproduce?

<FAB label="..." />

Workaround

<FAB 
  label="..."
  icon={undefined as unknown as IconSource} 
/>

Your Environment

software version
react-native-paper 5.1.3
@hbriese hbriese added the bug label Jan 12, 2023
@lukewalczak
Copy link
Member

Hey @hbriese, thanks for the feedback. I agree that we can improve types and that one of icon or label has to be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants