Skip to content

Commit

Permalink
feat(headless/tab): orientation type
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyeonsu committed Jan 22, 2025
1 parent 727a8ab commit 9b9a8c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/react-headless/tabs/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export interface UseTabsProps extends UseTabsStateProps, UseSwipeableStateProps
*/
duration?: number;
};

orientation?: "horizontal" | "vertical";
}

export interface TriggerProps {
Expand Down
4 changes: 1 addition & 3 deletions packages/react-headless/tabs/src/useTabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,10 @@ export function useTabs(props: UseTabsProps) {
onValueChange: omitOnValueChange,
isSwipeable = false,
swipeConfig,
orientation = "horizontal",
...restProps
} = props;

// TODO: orientation prop 추가
const orientation = "horizontal" as "horizontal" | "vertical";

const updateIndicatorStyle = React.useCallback(() => {
if (rootEl) {
rootEl.style.setProperty("--seed-design-tabs-indicator-left", `${triggerSize.left}px`);
Expand Down

0 comments on commit 9b9a8c1

Please sign in to comment.