Export the IconSource type from react-native-paper

Open Beginner friendly
#5,189 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
react-native, typescript

Research direction

Read the package's public type export entry points and locate where other component types are re-exported. Export IconSource so import type { IconSource } from 'react-native-paper' works, then run the relevant type or package export checks; done when consumers can import it from the package root without a deep import.

Written by the indexing model from the issue text.

Description

feature request

Is your feature request related to a problem? Please describe.

Most icon props take Paper's IconSource type, but react-native-paper doesn't export it. In 5.x apps imported it from react-native-paper/lib/typescript/components/Icon; in 6.x that path moved to lib/typescript/src/components/Icon, so those imports break on upgrade.

Describe the solution you'd like

import type { IconSource } from 'react-native-paper' works.

Describe alternatives you've considered

type IconSource = React.ComponentProps<typeof Icon>['source'] works today without a deep import.

Additional context

A new export, so it fits a 6.x minor.

Dominant language
TypeScript
Stars
14.5k
Forks
2.3k
Avg merge
2d 12h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from callstack/react-native-paper

All issues in callstack/react-native-paper

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.