()
| 60 | } |
| 61 | |
| 62 | function Sidebar() { |
| 63 | const groups = [...new Set(stories.map((entry) => entry.group))]; |
| 64 | |
| 65 | return ( |
| 66 | <nav |
| 67 | className="story-nav" |
| 68 | style={{ |
| 69 | width: 220, |
| 70 | flex: "0 0 auto", |
| 71 | overflowY: "auto", |
| 72 | padding: "18px 14px", |
| 73 | background: colors.lightGrey, |
| 74 | borderRight: `1px solid ${colors.grey}`, |
| 75 | fontSize: 14, |
| 76 | }} |
| 77 | > |
| 78 | {groups.map((group) => ( |
| 79 | <div key={group} style={{ marginBottom: 18 }}> |
| 80 | <div |
| 81 | style={{ |
| 82 | fontSize: 11, |
| 83 | fontWeight: 700, |
| 84 | letterSpacing: "0.08em", |
| 85 | textTransform: "uppercase", |
| 86 | color: colors.deepGrey, |
| 87 | marginBottom: 6, |
| 88 | }} |
| 89 | > |
| 90 | {group} |
| 91 | </div> |
| 92 | {stories |
| 93 | .filter((entry) => entry.group === group) |
| 94 | .map((entry) => ( |
| 95 | <a |
| 96 | key={entry.id} |
| 97 | href={`?story=${encodeURIComponent(entry.id)}`} |
| 98 | data-selected={entry.id === selectedId} |
| 99 | style={{ |
| 100 | position: "relative", |
| 101 | display: "block", |
| 102 | padding: "3px 0 3px 12px", |
| 103 | color: colors.deepGrey, |
| 104 | }} |
| 105 | > |
| 106 | {entry.name} |
| 107 | </a> |
| 108 | ))} |
| 109 | </div> |
| 110 | ))} |
| 111 | </nav> |
| 112 | ); |
| 113 | } |
| 114 | |
| 115 | function App() { |
| 116 | // Bare mode: exactly the component, nothing else. This is what tests load. |
nothing calls this directly
no outgoing calls
no test coverage detected