Skip to content

Commit

Permalink
feat: props 설명 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yougyung committed Jan 23, 2025
1 parent be03e15 commit f19699a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/shared/ui/Tabs/TabsItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ import { useContext } from 'react';

import { TabsContext } from './Tabs.context';

type Props = React.HTMLAttributes<HTMLDivElement> & {
type Props = {
/**
* tab name to be displayed.
*/
label: string;
/**
* if activated, exposed element.
*/
children: React.ReactNode;
};
} & React.HTMLAttributes<HTMLDivElement>;

export function TabsItem({ label, children, ...props }: Props) {
const content = useContext(TabsContext);
Expand Down
6 changes: 6 additions & 0 deletions src/shared/ui/Tabs/TabsRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ import { motion } from 'framer-motion';
import { TabsContext } from './Tabs.context';

type Props = {
/**
* children elements of the Tabs
*/
children: React.ReactNode;
/**
* default focusing tabsItem index.
*/
defaultIndex?: number;
} & React.HTMLAttributes<HTMLDivElement>;

Expand Down

0 comments on commit f19699a

Please sign in to comment.