scroll logs

This commit is contained in:
Chris Wanstrath 2026-01-28 11:09:05 -08:00
parent 47e5a57806
commit 707267bdaa

View File

@ -263,6 +263,12 @@ const LogsContainer = define('LogsContainer', {
color: theme('colors-textMuted'),
maxHeight: 200,
overflow: 'auto',
render({ props: { children }, parts: { Root } }) {
return <Root ref={(el: HTMLElement | null) => {
if (el) requestAnimationFrame(() => el.scrollTop = el.scrollHeight)
}}>{children}</Root>
}
})
const LogLine = define('LogLine', {