Skip to content

Commit

Permalink
feat(tabs): added orientation prop to Tab component
Browse files Browse the repository at this point in the history
  • Loading branch information
hirotomoyamada committed Oct 24, 2024
1 parent 93cfd52 commit ac79803
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-camels-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@yamada-ui/tabs": patch
---

Added orientation prop and attribute to Tab component.
2 changes: 2 additions & 0 deletions packages/components/tabs/src/tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const Tab = forwardRef<TabProps, "button">(
const {
disableRipple,
isManual,
orientation,
selectedIndex,
setFocusedIndex,
setSelectedIndex,
Expand Down Expand Up @@ -76,6 +77,7 @@ export const Tab = forwardRef<TabProps, "button">(
{...rest}
type="button"
aria-selected={ariaAttr(isSelected)}
data-orientation={orientation}
tabIndex={isSelected ? 0 : -1}
onFocus={isDisabled ? undefined : handlerAll(props.onFocus, onFocus)}
onPointerDown={onPointerDown}
Expand Down

0 comments on commit ac79803

Please sign in to comment.