mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-12 23:43:42 +01:00
21 lines
413 B
JavaScript
21 lines
413 B
JavaScript
![]() |
import { html, Component } from "/lib/index.js";
|
||
|
|
||
|
export default function BufferHeader(props) {
|
||
|
var topic = null;
|
||
|
if (props.buffer.topic) {
|
||
|
topic = html`<span class="topic">${props.buffer.topic}</span>`;
|
||
|
}
|
||
|
|
||
|
function handlePartClick(event) {
|
||
|
event.preventDefault();
|
||
|
props.onClose();
|
||
|
}
|
||
|
|
||
|
return html`
|
||
|
${topic}
|
||
|
<span class="actions">
|
||
|
<a href="#" onClick=${handlePartClick}>Part</a>
|
||
|
</span>
|
||
|
`;
|
||
|
}
|