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(Tabs): fix error with a single Tabs.Content as children #2534

Merged
merged 5 commits into from
Jul 27, 2023

Conversation

langz
Copy link
Contributor

@langz langz commented Jul 27, 2023

This should:

  • Fix the errors when providing Tabs component with a single Tabs.Content as children
  • Adds screenshot tests and unit tests for when data prop has a single element and when Tabs component has a single Tabs.content as children.

Here's how it looked and behaved when providing Tabs component with a single Tabs.Content as children:
Screenshot 2023-07-27 at 14 56 50
Screenshot 2023-07-27 at 14 57 45
Screenshot 2023-07-27 at 14 57 18

And when pressing the Tabs title you would get:
Screenshot 2023-07-27 at 14 57 59

Now after the fix, the same code will not result in an error, and it will look like this:

image

@vercel
Copy link

vercel bot commented Jul 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 27, 2023 10:10pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 27, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 07e7443:

Sandbox Source
eufemia-starter Configuration

@langz langz force-pushed the fix/tabs-single-react-element-as-children branch from 5c7c41f to 4d4c286 Compare July 27, 2023 13:03
@langz langz requested a review from tujoworker July 27, 2023 13:06
Copy link
Member

@tujoworker tujoworker left a comment

Choose a reason for hiding this comment

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

Looks good 👏

@langz langz changed the title fix(Tabs): fix single react element as children fix(Tabs): fix error when used with a single Tabs.Content as children Jul 27, 2023
@langz langz changed the title fix(Tabs): fix error when used with a single Tabs.Content as children fix(Tabs): fix error with a single Tabs.Content as children Jul 27, 2023
@langz langz merged commit 215e52c into main Jul 27, 2023
@langz langz deleted the fix/tabs-single-react-element-as-children branch July 27, 2023 22:06
tujoworker pushed a commit that referenced this pull request Jul 27, 2023
## [10.4.2](v10.4.1...v10.4.2) (2023-07-27)

### 🐛 Bug Fixes

* **Tabs:** fix error with a single Tabs.Content as children ([#2534](#2534)) ([215e52c](215e52c))
@tujoworker
Copy link
Member

🎉 This PR is included in version 10.4.2 🎉

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
Labels
Development

Successfully merging this pull request may close these issues.

2 participants