Export prop types consistently across components (<Name>Props)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start with the declarations in button.tsx, checkbox.tsx, and tabs.tsx, then search the component files for other Props types or interfaces lacking export. Confirm that the affected prop types can be imported by consumers and that the existing component checks still pass; lint or codemod work is optional follow-up.
Written by the indexing model from the issue text.
Description
Summary
Roughly half of sampled components don't export their prop type, so consumers can't import and extend it (e.g. to build a typed wrapper). Coverage is inconsistent even among the most-used components.
Current state
Exported: SwitchProps (switch.tsx:19), AccordionRootProps (accordion-root.tsx:27), DialogContentProps (dialog-content.tsx:8), FieldProps (field-root.tsx:9), FieldsetProps (fieldset.tsx:5), IconButtonProps (icon-button.tsx:20), SelectTriggerProps (select-trigger.tsx:36).
Not exported: ButtonProps (button.tsx:127, plain type, no export), CheckboxGroupProps/CheckboxItemProps (checkbox.tsx:61,88, plain interface), TabsRootProps/TabsTabProps (tabs.tsx:25,55).
Native-attribute extension itself is consistent (125 ComponentProps<...> usages across 74 files) — this is purely about the export keyword being missing on the type/interface declaration.
Suggested approach
- Add
exportto every<ComponentName>Propstype/interface, starting with Button, Checkbox, and Tabs since they're the highest-traffic components. - Consider a lint rule (or a codemod + CI check) that flags a component file whose prop type isn't exported, so this doesn't regress on new components.
Notes
Found via a components.build practices audit (types dimension).
- Dominant language
- TypeScript
- Stars
- 70
- Forks
- 13
- Avg merge
- 8d 56m
- Merged PRs (30d)
- 16
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raystack/apsara
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Docs: hand-duplicated props tables drift risk, missing a11y sections, no per-component changelogOpenenhancement global
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
bug global
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
StabilityNexus/Fate-EVM-Frontend#153 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
code-yeongyu/oh-my-openagent#9039 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Tencent/teamai-cli#862 ·
Maintainers usually reply within 1 day
-
bug good first issue hacktoberfest redis
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
libredb/libredb-studio#1164 ·
Maintainers usually reply within 1 day
-
flake
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day