-
Notifications
You must be signed in to change notification settings - Fork 84
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): add headerWidth prop (FE-4161) #4202
Conversation
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 bfd85df:
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
7d1dda9
to
7c1c7c1
Compare
src/components/tabs/__internal__/tabs-header/tabs-header.component.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had pretty much the same comments as @sjohnson-sage so once you address the requested changes, I'll be happy to give the PR a tick ✅
93bcbe6
to
f9b0195
Compare
Is this an issue with the width prop or just storybook? tabs.mov |
I'm pretty sure it is a bug, I will fix it |
@@ -356,6 +358,10 @@ Tabs.propTypes = { | |||
"no right side", | |||
"no sides", | |||
]), | |||
/** sets width to the tab headers. Can be any valid CSS string. | |||
* The headerWidth prop works only for `position="left"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth maybe having a custom prop validation here now that this prop works only when the position="left"
f990ae9
3f715dd
to
f48b03f
Compare
`tabsHeaderWidth` prop will set a width to `TabsHeader` component. It will allow users with very long title to make well aligned `Tabs` if there will be more of tabs group than one fixes: #4024
f48b03f
to
b76b8a7
Compare
🎉 This PR is included in version 77.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
headerWidth
prop will set a width toTabsHeader
component.It will allow users with very long title to make well aligned
Tabs
if there will be more of tabs group than one
fixes: #4024
Proposed behaviour
add headerWidth prop
Current behaviour
lack of support for custom width
Checklist
All themes are supported if requiredd.ts
file added or updated if requiredCarbon implementation and Design System documentation are congruentTesting instructions
New storybook story created
with tabsHeaderWidth