MCPcopy Create free account
hub / github.com/FormidableLabs/react-live / App

Function App

packages/react-live/stories/main.tsx:115–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113}
114
115function App() {
116 // Bare mode: exactly the component, nothing else. This is what tests load.
117 if (params.get("only")) {
118 return <Story key={selectedId} />;
119 }
120
121 return (
122 <>
123 <style>{globalCss}</style>
124 <div
125 style={{ display: "flex", flexDirection: "column", height: "100vh" }}
126 >
127 <Header />
128 <div style={{ display: "flex", flex: 1, minHeight: 0 }}>
129 <Sidebar />
130 <main style={{ flex: 1, overflow: "auto", padding: "20px 24px" }}>
131 <h1
132 style={{
133 margin: "0 0 16px",
134 fontSize: 13,
135 fontWeight: 500,
136 color: colors.deepGrey,
137 }}
138 >
139 {selected?.id ?? "No stories found"}
140 </h1>
141 <Story key={selectedId} />
142 </main>
143 </div>
144 </div>
145 </>
146 );
147}
148
149const container = document.getElementById("root");
150if (!container) throw new Error("stories/index.html is missing #root");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected