Skip to content

Commit

Permalink
fix: moved size and variant prop from tabs up to tab container
Browse files Browse the repository at this point in the history
  • Loading branch information
benjitrosch committed Mar 8, 2022
1 parent bd6198e commit 86f5354
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tabs.tsx/Tabs.stories.tsx
Expand Up @@ -19,5 +19,5 @@ export const Default: Story<TabsProps<number>> = (args) => {
</Tabs>
)
}
Default.args = {}

Default.args = {}
6 changes: 6 additions & 0 deletions src/Tabs.tsx/index.tsx
Expand Up @@ -15,13 +15,17 @@ export interface TabsProps<T> extends IComponentBaseProps {
children: ReactElement<TabProps<T>>[]
value?: T
onChange?: (value: T) => void
variant?: 'bordered' | 'lifted'
size?: ComponentSize
boxed?: boolean
}

const Tabs = <T extends string | number | undefined>({
children,
value,
onChange,
variant,
size,
boxed,
dataTheme,
className,
Expand All @@ -45,6 +49,8 @@ const Tabs = <T extends string | number | undefined>({
>
{children.map((child) => {
return cloneElement(child, {
variant,
size,
activeValue: activeValue,
onClick: (value: T) => {
setActiveValue(value)
Expand Down

0 comments on commit 86f5354

Please sign in to comment.