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: fix react wrapper types #532

Merged
merged 6 commits into from
Apr 20, 2023
Merged

fix: fix react wrapper types #532

merged 6 commits into from
Apr 20, 2023

Conversation

muratcorlu
Copy link
Contributor

This PR fixes missing types in React wrappers.

Copy link
Member

@AykutSarac AykutSarac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the generated d.ts file ISelectOption interface requires a parameter so we need to pass a default type:

// src/components/select/bl-select.ts
interface ISelectOption<T = string>

Another issue is ValueType is not defined here:

// baklava-react.d.ts
export declare const BlSelectOption: React.LazyExoticComponent<ReactWebComponent<BlSelectOptionType<string>, {
    onBlSelectOption: EventName<CustomEvent<ValueType | string | null>>;
    onBlFocus: EventName<CustomEvent<ValueType | string | null>>;
    onBlBlur: EventName<CustomEvent<ValueType | string | null>>;
}>>;

@muratcorlu
Copy link
Contributor Author

I don't like how we fix this typing issue in general, but I think I addressed the points you mentioned.

@muratcorlu muratcorlu merged commit db6dfd7 into next Apr 20, 2023
@muratcorlu muratcorlu deleted the fix-react-wrapper-types branch April 20, 2023 16:36
@github-actions
Copy link

🎉 This PR is included in version 2.1.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@muratcorlu muratcorlu mentioned this pull request May 10, 2023
muratcorlu added a commit that referenced this pull request May 12, 2023
This PR includes the features/fixes for the release of v2.1.0

## Features

* **Switch**: CSS property to set custom color for `off` state (#527)
* **Popover**: CSS properties to set `max-width` and `border-size` (#483)

## Fixes

* **Dropdown**: Close dropdown when an item is clicked (#533) 
* **Popover**: Prevent exiting fullscreen with popover close (#551)
* **Dialog**: Prevent exiting fullscreen with dialog close (#548)
* **Select**: Select item separator is back (#552) 
* React wrapper types (#532) 
* Set package type as module (#570)

Thanks to our contributors for this version 🚀 :

@muratcorlu @ogunb @abugraokkali @AykutSarac @ozkersemih
@github-actions
Copy link

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants