(
values: Record<string, unknown> = {},
)
| 24 | export const tabsExampleCode = ( |
| 25 | values: Record<string, unknown> = {}, |
| 26 | ): string => { |
| 27 | const variant = values.variant as string | undefined; |
| 28 | |
| 29 | const props: string[] = []; |
| 30 | if (variant !== undefined && variant !== "pill") |
| 31 | props.push(`variant="${variant}"`); |
| 32 | const extraProps = props.length ? `\n ${props.join("\n ")}` : ""; |
| 33 | |
| 34 | const hookOpts: string[] = []; |
| 35 | if (variant !== undefined && variant !== "pill") |
| 36 | hookOpts.push(`variant: "${variant}"`); |
| 37 | const optsStr = hookOpts.length ? `, { ${hookOpts.join(", ")} }` : ""; |
| 38 | |
| 39 | return `import { Tabs } from "@/components/remocn/tabs"; |
| 40 | import { useTabsTransition } from "@/components/remocn/use-tabs-transition"; |
| 41 | |
| 42 | export const Scene = () => { |
| 43 | const style = useTabsTransition([ |
| 44 | { at: 18, state: "Account", duration: 16 }, |
| 45 | { at: 58, state: "Password", duration: 18 }, |
| 46 | { at: 94, state: "Settings", duration: 12 }, |
| 47 | ]${optsStr}); |
| 48 | |
| 49 | return <Tabs style={style}${extraProps} />; |
| 50 | };`; |
| 51 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected