File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed
apps/docs/content/docs/components
core/theme/src/components Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @heroui/theme " : patch
3+ ---
4+
5+ Fix tabs slots "wrapper" rename to "tabWrapper" -- Breaking Change (#4552 )
Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ function AppTabs() {
199199- ** tabContent** : The tab content slot, it wraps the tab content.
200200- ** cursor** : The cursor slot, it wraps the cursor. This is only visible when ` disableAnimation=false `
201201- ** panel** : The panel slot, it wraps the tab panel (content).
202+ - ** tabWrapper** : The tab wrapper slot, it wraps the tab and the tab content.
202203
203204### Custom Styles
204205
@@ -343,7 +344,7 @@ You can customize the `Tabs` component by passing custom Tailwind CSS classes to
343344 },
344345 {
345346 attribute: " classNames" ,
346- type: " Partial<Record<\" base\" | \" tabList\" | \" tab\" | \" tabContent\" | \" cursor\" | \" panel\" , string>>" ,
347+ type: " Partial<Record<\" base\" | \" tabList\" | \" tab\" | \" tabContent\" | \" cursor\" | \" panel\" | \" tabWrapper \" , string>>" ,
347348 description: " Allows to set custom class names for the card slots." ,
348349 default: " -"
349350 },
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ export function useTabs<T extends object>(originalProps: UseTabsProps<T>) {
171171 const getWrapperProps : PropGetter = useCallback (
172172 ( props ) => ( {
173173 "data-slot" : "tabWrapper" ,
174- className : slots . wrapper ( { class : clsx ( classNames ?. wrapper , props ?. className ) } ) ,
174+ className : slots . tabWrapper ( { class : clsx ( classNames ?. tabWrapper , props ?. className ) } ) ,
175175 "data-placement" : placement ,
176176 "data-vertical" :
177177 isVertical || placement === "start" || placement === "end" ? "vertical" : "horizontal" ,
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ const tabs = tv({
7272 // focus ring
7373 ...dataFocusVisibleClasses ,
7474 ] ,
75- wrapper : [ ] ,
75+ tabWrapper : [ ] ,
7676 } ,
7777 variants : {
7878 variant : {
@@ -166,15 +166,15 @@ const tabs = tv({
166166 start : {
167167 tabList : "flex-col" ,
168168 panel : "py-0 px-3" ,
169- wrapper : "flex" ,
169+ tabWrapper : "flex" ,
170170 } ,
171171 end : {
172172 tabList : "flex-col" ,
173173 panel : "py-0 px-3" ,
174- wrapper : "flex flex-row-reverse" ,
174+ tabWrapper : "flex flex-row-reverse" ,
175175 } ,
176176 bottom : {
177- wrapper : "flex flex-col-reverse" ,
177+ tabWrapper : "flex flex-col-reverse" ,
178178 } ,
179179 } ,
180180 } ,
You can’t perform that action at this time.
0 commit comments