UNPKG

@dvcol/neo-svelte

Version:

Neomorphic ui library for svelte 5

27 lines (26 loc) 1.11 kB
import type { TabId } from '../index.js'; import type { Snippet } from 'svelte'; import type { NeoCardProps } from '../cards/neo-card.model.js'; import type { NeoTransitionContainerProps } from '../containers/neo-transition-container.model.js'; import type { NeoTabsContext } from './neo-tabs-context.svelte.js'; export interface NeoTabsCardContext { /** * If `true`, pane transition will be animated. * @default true */ animate?: boolean; } export type NeoTabsCardProps<Id extends TabId, Value = unknown> = { /** * Snippet to display as the card content. */ children?: Snippet<[NeoTabsContext<Id, Value> | undefined]>; /** * Optional props to pass to the tab container if `animate` is `true`. * @see animate */ containerProps?: NeoTransitionContainerProps; } & NeoTabsCardContext & Omit<NeoCardProps, 'children'>; export declare const NeoTabsCardContextSymbol: unique symbol; export declare const setTabsCardContext: (context: NeoTabsCardContext) => NeoTabsCardContext; export declare const getTabsCardContext: () => NeoTabsCardContext | undefined;