mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
17 lines
479 B
JavaScript
17 lines
479 B
JavaScript
import { html } from "../lib/index.js";
|
|
import * as irc from "../lib/irc.js";
|
|
|
|
export default function Membership(props) {
|
|
if (!this.props.value) {
|
|
return null;
|
|
}
|
|
|
|
// XXX: If we were feeling creative we could generate unique colors for
|
|
// each item in ISUPPORT CHANMODES. But I am not feeling creative.
|
|
const name = irc.STD_MEMBERSHIP_NAMES[this.props.value[0]] || "";
|
|
return html`
|
|
<span class="membership ${name}" title=${name}>
|
|
${this.props.value}
|
|
</span>
|
|
`;
|
|
}
|