mirror of
https://git.sr.ht/~emersion/gamja
synced 2025-04-02 02:00:04 -04:00
Add missing buffer-header.js
This commit is contained in:
parent
3e33999619
commit
4485950b67
1 changed files with 20 additions and 0 deletions
20
components/buffer-header.js
Normal file
20
components/buffer-header.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
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>
|
||||
`;
|
||||
}
|
Loading…
Add table
Reference in a new issue