MCPcopy Create free account
hub / github.com/cosdensolutions/code / Stack

Function Stack

videos/long/react-storybook-tutorial/src/components/Stack.tsx:7–25  ·  view source on GitHub ↗
({
  children,
  orientation = 'horizontal',
}: StackProps)

Source from the content-addressed store, hash-verified

5};
6
7export default function Stack({
8 children,
9 orientation = 'horizontal',
10}: StackProps) {
11 const orientationStyles: Record<StackProps['orientation'], CSSProperties> = {
12 horizontal: {
13 display: 'flex',
14 flexDirection: 'row',
15 gap: '1rem',
16 },
17 vertical: {
18 display: 'flex',
19 flexDirection: 'column',
20 gap: '1rem',
21 },
22 };
23
24 return <div style={{ ...orientationStyles[orientation] }}>{children}</div>;
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected