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

fix(button): Fix prop types #134

Merged
merged 5 commits into from
Mar 11, 2022
Merged

fix(button): Fix prop types #134

merged 5 commits into from
Mar 11, 2022

Conversation

mfarukkoc
Copy link
Contributor

@mfarukkoc mfarukkoc commented Jul 19, 2021

Description

  • Changed forwardRef types.
  • Removed explicit prop type in the component definition.
- const Button = React.forwardRef<HTMLButtonElement, Record<string, any>>(
+ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(

-  function ButtonComponent(props: ButtonProps, ref) {
+  function ButtonComponent(props, ref) {
  • Fixed incompatible types in the Dropdown component
  Types of property ''aria-haspopup'' are incompatible.
    Type '"listbox" | "menu" | "combobox"' is not assignable to type 'boolean | "listbox" | "menu" | "dialog" | "false" | "true" | "tree" | "grid" | undefined'.
      Type '"combobox"' is not assignable to type 'boolean | "listbox" | "menu" | "dialog" | "false" | "true" | "tree" | "grid" | undefined'.
  • Fixed typo in the passwordInput component.
- ariaLabel={iconAriaLabel}
+ aria-label={iconAriaLabel}

Closes #133

* Change forwardRef types.
* Remove explicit prop type in the component definition.
(TSC can detect the type automatically from forwardRef now.)
ref property comes automatically with forwardRef usage.
@mucahit mucahit assigned jamcry and unassigned mfarukkoc Sep 2, 2021
@mucahit mucahit assigned Anlerkan and unassigned jamcry Feb 24, 2022
@Anlerkan Anlerkan requested review from akgunberk, edizcelik, ErenYLCN, gulcinuras, tatata96 and yigiterdev and removed request for bilgeyucel March 11, 2022 10:58
@mucahit mucahit added Ready for new release PR is reviewed and ready to be merged and removed ready for review labels Mar 11, 2022
@mucahit mucahit merged commit 7d98256 into next-release Mar 11, 2022
@mucahit mucahit deleted the fix/button-prop-types branch March 11, 2022 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for new release PR is reviewed and ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants