()
| 113 | } |
| 114 | |
| 115 | function 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 | |
| 149 | const container = document.getElementById("root"); |
| 150 | if (!container) throw new Error("stories/index.html is missing #root"); |
nothing calls this directly
no outgoing calls
no test coverage detected