Playground
++ Edit the code on the left to see the messages SayKit extracts and the code it compiles to. + Everything runs in your browser, so pick a published version to compare how it behaves. +
+
+
+ Edit the code on the left to see the messages SayKit extracts and the code it compiles to. + Everything runs in your browser, so pick a published version to compare how it behaves. +
+
+
{children}
; +} + +/** + * A list rather than a table. In a half-width pane five columns leave the message + * — the thing you actually came to read — fighting its own metadata for space, and + * every id, context or comment added makes it narrower. Giving the message its own + * full-width line and demoting the metadata to a line beneath keeps the message at + * 100% no matter how much metadata a message carries. + */ +function MessageList({ + messages, + hashOf, +}: { + messages?: Message[]; + hashOf?: Runtime['generateHash']; +}) { + if (!messages) returnsay tagged template or a{' '}
+ {''} element.
+ + {message.message} +
+ + {message.comments.length > 0 && ( ++ {message.comments.join('\n')} +
+ )} + +
+ {code}
+
+ )}
+