diff --git a/src/next/use-tabs.d.ts b/src/next/use-tabs.d.ts index 8f77cdd..0758bc4 100644 --- a/src/next/use-tabs.d.ts +++ b/src/next/use-tabs.d.ts @@ -24,10 +24,10 @@ interface Result { onActivate: (e: Event) => void; } -export type RenderTabs = Pick< - Result, - 'tabs' | 'active' | 'onActivate' ->; +export interface RenderTabs + extends Pick, 'tabs' | 'active' | 'onActivate'> { + className?: string; +} export declare const useTabs: ( tabs: T[], diff --git a/src/next/use-tabs.js b/src/next/use-tabs.js index a2d710a..fe60218 100644 --- a/src/next/use-tabs.js +++ b/src/next/use-tabs.js @@ -48,15 +48,16 @@ export const useTabs = (tabs, { hashParam, onActivate }) => { }; }; -export const renderTabs = ({ tabs, active, onActivate }) => +export const renderTabs = ({ tabs, active, onActivate, className }) => tabs.map((tab) => { const title = invoke(tab.title); return html`${tab.content ?? title}`;