We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 686ca2d commit bd7a203Copy full SHA for bd7a203
1 file changed
pages/storybook.tsx
@@ -179,7 +179,7 @@ function displayProps(props: Object) {
179
const xprops = Object.fromEntries(
180
Object.entries(props).map(([key, value]) => [
181
key,
182
- key === 'children' ? ReactDomServer.renderToString(value) : value,
+ React.isValidElement(value) ? ReactDomServer.renderToString(value) : value,
183
])
184
)
185
return JSON.stringify(xprops, null, 2)
@@ -193,7 +193,7 @@ export default function Storybook() {
193
<div className="my-4 d-lg-flex flex-items-start">
194
<nav className="menu col-12 col-lg-3 mr-4 color-bg-subtle position-lg-sticky top-0">
195
{stories.map(({ name }) => (
196
- <a className="menu-item" href={`#${name}`}>
+ <a key={name} className="menu-item" href={`#${name}`}>
197
{name}
198
</a>
199
))}
0 commit comments