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

feat(Tabs): Support icon-only tab #2496

Merged
merged 12 commits into from
Feb 17, 2025
Merged

feat(Tabs): Support icon-only tab #2496

merged 12 commits into from
Feb 17, 2025

Conversation

saurabhdaware
Copy link
Member

@saurabhdaware saurabhdaware commented Jan 27, 2025

Description

This pr -
add support for icons only
fixes alignment of icon
fixes border radius of tabs
removes divider from tablist
updates border color
updates padding
updates type

Changes

Additional Information

Component Checklist

  • Update Component Status Page
  • Perform Manual Testing in Other Browsers
  • Add KitchenSink Story
  • Add Interaction Tests (if applicable)
  • Add changeset

Copy link

changeset-bot bot commented Jan 27, 2025

⚠️ No Changeset found

Latest commit: 4135b63

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jan 27, 2025

✅ PR title follows Conventional Commits specification.

Copy link

codesandbox-ci bot commented Jan 27, 2025

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 4135b63:

Sandbox Source
razorpay/blade: basic Configuration

@rzpcibot
Copy link
Collaborator

rzpcibot commented Jan 27, 2025

Bundle Size Report

Updated Components
Status Component Base Size (kb) Current Size (kb) Diff
Drawer, DrawerBody, DrawerHeader, drawerPadding 17.580 17.581 +0.001 KB
Tabs, TabItem, TabList, TabPanel 7.304 6.856 -0.448 KB
Button 6.118 6.119 +0.001 KB

Generated by 🚫 dangerJS against 4135b63

@@ -59,7 +59,7 @@ type TabItemProps = {
/**
* The label of the tab item.
*/
children: React.ReactNode;
children?: React.ReactNode;
Copy link
Member

Choose a reason for hiding this comment

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

Let's add accessibilityLabel prop

anuraghazra
anuraghazra previously approved these changes Jan 27, 2025
anuraghazra
anuraghazra previously approved these changes Feb 5, 2025
@anuraghazra
Copy link
Member

height of the Tabs seems to be changed breaking the existing examples

image image

@anuraghazra
Copy link
Member

This looks a bit too wide, Is it just taking the parent component's width?

image

@tewarig
Copy link
Contributor

tewarig commented Feb 7, 2025

height of the Tabs seems to be changed breaking the existing examples

image image

These changes are taken from Figma. We have changed paddingTop in the case of Tabs. Discussed this with ~RK, and we will do these in a different PR after FTX.

@tewarig
Copy link
Contributor

tewarig commented Feb 7, 2025

This looks a bit too wide, Is it just taking the parent component's width?

image

yes it's parent is a box with width 200px

Comment on lines 99 to 100
? React.Children.map(children, (child) => {
return <>{child}</>;
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this not same as children?

Copy link
Member Author

Choose a reason for hiding this comment

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

We also won't need that if-else check itself if this is just children

Copy link
Contributor

Choose a reason for hiding this comment

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

removed

Copy link
Member Author

@saurabhdaware saurabhdaware 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 to me. Can't approve the PR since I created it.

@tewarig tewarig merged commit 24b1ad8 into master Feb 17, 2025
12 of 14 checks passed
@tewarig tewarig deleted the feat/support-icon-only-tab branch February 17, 2025 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants