Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Add typings for component props #117

Closed
19 tasks done
levithomason opened this issue Aug 20, 2018 · 3 comments
Closed
19 tasks done

Add typings for component props #117

levithomason opened this issue Aug 20, 2018 · 3 comments
Labels
vsts Paired with ticket in vsts

Comments

@levithomason
Copy link
Member

levithomason commented Aug 20, 2018

Feature Request

Problem description

We are missing or have removed props typings in our components.

Proposed solution

See #33 fo the discussion and agreement on this proposal. Let's do this one component and PR at a time to give room for addressing issues that will arise.

  1. Add props typings only for handledProps as this is most helpful to the user.
  2. Make all props interfaces extensible so users can pass any prop value they wish (also aligns with our practice of spreading rest props).
  3. Provide a *Strict named interface which is not extensible. This allows users to lock allowed props to strictly those supported by the component if they wish, see export element props without [key: string]: any; Semantic-Org/Semantic-UI-React#2836. Our props interfaces will union this interface making it extensible.

TODO

@levithomason
Copy link
Member Author

/cc @kuzhelov @mnajdova @Bugaa92

@levithomason
Copy link
Member Author

It is worth nothing that we have a few global props such as variables, styles, and as. This actually excludes some edge case components like Portal and Provider. However, we should consider how we advertise these prop in docs and enforce them in tests.

@kuzhelov
Copy link
Contributor

kuzhelov commented Sep 7, 2018

lets close it as main concern expressed by this issue is addressed now

@kuzhelov kuzhelov closed this as completed Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
vsts Paired with ticket in vsts
Projects
None yet
Development

No branches or pull requests

3 participants