MCPcopy Create free account
hub / github.com/Remocn/remocn / tabsExampleCode

Function tabsExampleCode

components/docs/examples/tabs-example.tsx:26–51  ·  view source on GitHub ↗
(
  values: Record<string, unknown> = {},
)

Source from the content-addressed store, hash-verified

24export 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";
40import { useTabsTransition } from "@/components/remocn/use-tabs-transition";
41
42export 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};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected